sfsinger19103 / election_anomaly

See more current version at https://github.com/ElectionDataAnalysis/election_data_analysis/
https://github.com/ElectionDataAnalysis/election_data_analysis/
10 stars 0 forks source link

Dataloading doesn't work when the input db name is postgres #176

Open Raghu-Srungavarapu opened 4 years ago

Raghu-Srungavarapu commented 4 years ago

When the dbname in run_time.ini is given as 'postgres' it produces the following output. The code works well for any other database. The debug stopping point for this error is, create_cdf_db__init__.py - line 121 (metadata.create_all())

Branch: update-param-file-handling Commit ID: commit 8a90c14e593697cdeae22ec917316db4118a2a66

Connected to pydev debugger (build 193.6015.41) Traceback (most recent call last): File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1245, in _execute_context self.dialect.do_execute( File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\default.py", line 581, in do_execute cursor.execute(statement, parameters) psycopg2.errors.InvalidSchemaName: no schema has been selected to create in

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 2041, in _optional_conn_ctx_manager yield conn File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 2049, in _run_visitor conn._run_visitor(visitorcallable, element, kwargs) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1618, in _run_visitor visitorcallable(self.dialect, self, kwargs).traverse_single(element) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\visitors.py", line 138, in traverse_single return meth(obj, kw) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\ddl.py", line 777, in visit_metadata self.traverse_single( File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\visitors.py", line 138, in traverse_single return meth(obj, kw) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\ddl.py", line 815, in visit_table self.traverse_single(column.default) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\visitors.py", line 138, in traverse_single return meth(obj, **kw) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\ddl.py", line 859, in visit_sequence self.connection.execute(CreateSequence(sequence)) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 982, in execute return meth(self, multiparams, params) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\sql\ddl.py", line 72, in _execute_on_connection return connection._execute_ddl(self, multiparams, params) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1039, in _execute_ddl ret = self._execute_context( File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1249, in _execute_context self._handle_dbapi_exception( File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1476, in _handle_dbapi_exception util.raise_from_cause(sqlalchemy_exception, exc_info) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\util\compat.py", line 398, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\util\compat.py", line 152, in reraise raise value.with_traceback(tb) File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\base.py", line 1245, in _execute_context self.dialect.do_execute( File "C:\Users\jsru2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqlalchemy\engine\default.py", line 581, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InvalidSchemaName) no schema has been selected to create in

[SQL: CREATE SEQUENCE id_seq] (Background on this error at: http://sqlalche.me/e/f405)