aboulle / DxTools

Processing XRD data files recorded with the Bruker D8 diffractometer
Other
6 stars 3 forks source link

SciPy ImportError upon attempting to run dxtools.py #1

Open shaashwatsaraff opened 7 months ago

shaashwatsaraff commented 7 months ago

I am trying to run dxtools.py as described in the readme.

I have the following dependencies explicitly installed in the virtual environment from where I'm invoking the script:

[tool.poetry.dependencies]
python = "^3.11"
scipy = "^1.12.0"
matplotlib = "^3.8.3"
ipykernel = "^6.29.3"
ipympl = "^0.9.3"

Trying to run it gives me the following error:

$ python3 dxtools.py                                                                                                                                                                                                          

Traceback (most recent call last):
  File "/home/ss/temp/XRD/DxTools/dxtools.py", line 23, in <module>
    from data_processor import *
  File "/home/ss/temp/XRD/DxTools/data_processor.py", line 11, in <module>
    from scipy import loadtxt, savetxt, pi, log10, sin, cos, mgrid, column_stack, row_stack, append, shape, loadtxt, zeros, meshgrid, nan
ImportError: cannot import name 'loadtxt' from 'scipy' (/home/ss/temp/XRD/DxTools/.venv/lib/python3.11/site-packages/scipy/__init__.py)

Perhaps the current version of DxTools was built on an older version of SciPy which might have had loadtxt? Could you please update it to work with the current SciPy version, or let us know which version of SciPy to install alongside DxTools?

Many thanks!

aboulle commented 7 months ago

Hello, thanks for the feedback. I fixed the issue. Let me know if it works correctly.