Goodman-lab / DP5

Python workflow for DP5 and DP4 analysis of organic molecules
Other
173 stars 99 forks source link

UnboundLocalError: local variable 'labels' referenced before assignment #9

Closed L3ul closed 4 years ago

L3ul commented 4 years ago

Managed to get DP4-AI running on a Debian VM, but I can't get it to work on Windows 10 using Conda.

Reading data from the output files... Traceback (most recent call last): File "PyDP4.py", line 630, in main(settings) File "PyDP4.py", line 296, in main Isomers = DFT.ReadShieldings(Isomers) File "C:\Users\L3ul\Desktop\AT1\Opt_E\Gaussian.py", line 491, in ReadShieldings iso.ShieldingLabels = labels UnboundLocalError: local variable 'labels' referenced before assignment

KristapsE commented 4 years ago

My immediate suspicion is that it is once more Windows not understanding Linux style paths.

In line 466: for GOutpFile in iso.NMROutputFiles: doesn't run even for a single iteration, because NMROutputFiles is empty, as Python script on windows does not find any files with Linux style paths. So it reads no shielding data and no label data either.

iso.NMROutputFiles are filled in either RunNMRCalcs or GetPrerunNMRCalcs functions, depending on which is run in your particular situation.

I would probably add a few print statements there to check, where exactly it fails in those functions.

KristapsE commented 4 years ago

Could you please test this again on Windows 10? I have just merged some pull requests which should improve the Windows support.