buda-base / drs-deposit

Harvard DRS Deposit base
1 stars 0 forks source link

GetReadyWorks on bodhi fails with the following error message. #86

Closed TBRC-TimB closed 3 years ago

TBRC-TimB commented 4 years ago

Calling GetReadyVolumes for n = 100 Traceback (most recent call last): File "/usr/local/bin/getReadyWorks", line 10, in sys.exit(getReadyWorks()) File "/usr/local/lib/python3.7/dist-packages/DBApps/getReadyWorks.py", line 25, in getReadyWorks myrs: list = gr.GetSprocResults('GetReadyVolumes', grArgs.numWorks) File "/usr/local/lib/python3.7/dist-packages/DBApps/DbApp.py", line 126, in GetSprocResults self.validateExpectedColumns(workCursor.description) File "/usr/local/lib/python3.7/dist-packages/DBApps/DbApp.py", line 91, in validateExpectedColumns for cursorTuple in cursorDescription: TypeError: 'NoneType' object is not iterable

jimk-bdrc commented 4 years ago

Turns out there's some lethal bad shit in MySql such that when you bail out of a transaction in the Python debugger, it seems to leave a transaction holding locks. We were recklessly debugging, and left a bunch of these open. It's no big deal to open a console, find out which transactions are and terminate them.

jimk-bdrc commented 4 years ago

Even better, test the GetSprocResults return for its type. If its null, or its type is NoneType, just continue.

jimk-bdrc commented 3 years ago

Commit @8c818053

jimk-bdrc commented 3 years ago

When a SPROC returns nothing, but columns are expected, the system will raise this error:

DBApps.SprocColumnError.SprocColumnError: Invoked object GetReadyVolumes returned no expected data.

When a SPROC retiurns columns but they don't match the expected list, the system will raise this error.

DBApps.SprocColumnError.SprocColumnError: Invoked object GetReadyVolumes_no_results Expected to return columns ['WorkName', 'HOLLIS', 'Volume', 'OutlineUrn', 'PrintMasterUrn']. Only returned ['WorkName', 'HOLLIS'].