thenineteen / Semiology-Visualisation-Tool

Data driven 3D brain visualisation of semiology. Semiology to anatomy translator based on over 4600 patients from 309 peer-reviewed articles.
MIT License
9 stars 6 forks source link

No module named 'pandas' using zipped repository #232

Closed fepegar closed 2 years ago

fepegar commented 2 years ago

Error log in 3D Slicer:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/mariangalovic/MATLAB/Semiology-Visualisation-Tool-master/slicer/SemiologyVisualisation.py", line 13, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'
fepegar commented 2 years ago

It looks like this bug was introduced in the following commit:

The pandas module is not expected to be installed when the Slicer module is imported within 3D Slicer. The following line must be removed: https://github.com/thenineteen/Semiology-Visualisation-Tool/blame/master/slicer/SemiologyVisualisation.py#L13

Therefore, the typing hint pd.DataFrame cannot be used (which is fine).

thenineteen commented 2 years ago

thanks @fepegar

I will edit in a pull request removing line 13 and replacing pd with pandas