Issue Number | 4583 |
---|---|
Summary | Fix Module cdrdb.py (Python 3?) |
Created | 2019-02-26 17:04:02 |
Issue Type | Bug |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-08-01 07:44:21 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.240797 |
Trying to run a global change run from the DEV-VM on PROD caused an error due to problems connecting to the DB. The resulting error triggered an additional error which should be fixed.
C:\...\DevTools\GlobalChange>python ProtocolRef.py --tier PROD --mode test --session <session>
2019-02-25 18:11:57.874 [INFO] Saving test output to 'C:/cdr/GlobalChange/2019-02-25_18-11-57'
2019-02-25 18:11:57.874 [INFO] Running on PROD
Traceback (most recent call last):
File "ProtocolRef.py", line 66, in select
conn = cdrdb.connect(tier=opts.tier)
File "C:\CDR\lib\Python\cdrapi\db.py", line 50, in connect
return pyodbc.connect(connection_string, **opts)
pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 13 for SQL Server]TCP Provider: The requested name is valid, but no data of the requested type was found.\r\n (11004) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 13
for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 13 for SQL Server]Invalid connection string attribute (0); [08001] [Microsoft][ODBC Driver 13 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (11004)
')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ProtocolRef.py", line 144, in <module>
job.run()
File "C:\CDR\lib\Python\ModifyDocs.py", line 244, in run
doc_ids = self.select()
File "ProtocolRef.py", line 71, in select
except cdrdb.Error as info:
AttributeError: module 'cdrapi.db' has no attribute 'Error'
Fixed as part of Joule work.
Elapsed: 0:00:00.001440