Skip to content

MGET functions that require MATLAB fail on Windows with UnboundLocalError: cannot access local variable 'oldLdLibraryPath' where it is not associated with a value #38

@jjrob

Description

@jjrob

The traceback looks similar to this:

  File "C:\Users\jjr8\AppData\Local\ESRI\conda\envs\arcgispro-py3-denmod2\Lib\site-packages\GeoEco\Matlab\_MatlabWorkerProcess.py", line 533, in _Worker
    MatlabFunctions.Initialize(loggingQueue=outputQueue)
  File "C:\Users\jjr8\AppData\Local\ESRI\conda\envs\arcgispro-py3-denmod2\Lib\site-packages\GeoEco\Matlab\_MatlabFunctions.py", line 50, in Initialize
    oldPath = MatlabDependency.FindMatlab(setPath=True, loggingQueue=loggingQueue)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jjr8\AppData\Local\ESRI\conda\envs\arcgispro-py3-denmod2\Lib\site-packages\GeoEco\Matlab\_MatlabDependency.py", line 137, in FindMatlab
    return oldLdLibraryPath
           ^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'oldLdLibraryPath' where it is not associated with a value

The problem is that it should say return oldPath rather than return oldLdLibraryPath there. This was not caught by the normal build and test action because of #26.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions