pynist icon indicating copy to clipboard operation
pynist copied to clipboard

ImportError: cannot import name 'chunks' from 'domdf_python_tools.utils'

Open alwalt opened this issue 3 years ago • 1 comments

Hi,

I noticed that this module seems to have been moved. Is that correct?

alwalt avatar Mar 10 '22 20:03 alwalt

@alvawa27 Yes it appears to have moved from utils to iterative in newer versions of domdf_python_tools As per: https://domdf-python-tools.readthedocs.io/en/latest/api/iterative.html?highlight=chunks#domdf_python_tools.iterative.chunks

To fix I had to edit the file that threw the error, in my case it was buried in a conda environment: nano /home/X/anaconda3/envs/Y/lib/python3.7/site-packages/pyms_nist_search/reference_data.py

And update the import line to use the new location: from domdf_python_tools.utils import chunks became from domdf_python_tools.iterative import chunks

DMTSource avatar May 31 '22 20:05 DMTSource