lmmentel / mendeleev

A python package for accessing various properties of elements, ions and isotopes in the periodic table of elements.
https://mendeleev.readthedocs.io
MIT License
225 stars 43 forks source link

ImportError: module 'mendeleev' has no element with symbol 'fetch' #147

Closed GCS-ZHN closed 6 months ago

GCS-ZHN commented 6 months ago

Describe the bug

Fail to import mendeleev.fetch submodule by from mendeleev import fetch due to the definition of mendeleev.__getattr__ function.

>>> from mendeleev import fetch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/HOME/scw6byf/run/miniconda3/lib/python3.10/site-packages/mendeleev/__init__.py", line 153, in __getattr__
    raise ImportError(
ImportError: module 'mendeleev' has no element with symbol 'fetch', please check you spelling

Specification

lmmentel commented 6 months ago

Thanks a lot for reporting this. It's a bit surprising this wasn't caught by any of the tests. I'll have a look later this week.

In the meantime, downgrading to v0.15.0 should work.