You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of scanpy.
(optional) I have confirmed this bug exists on the master branch of scanpy.
When scanpy gets installed with the latest version of importlib_metadata (2.0), the
command sc.logging.print_versions() fails with the following error:
WARNING: If you miss a compact list, please try `print_header`!
Traceback (most recent call last):
File "/home/sturm/anaconda3/envs/scanpy_test/lib/python3.7/site-packages/sinfo/main.py", line 195, in sinfo
mod_version = _find_version(mod.__version__)
AttributeError: module 'importlib_metadata' has no attribute '__version__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sturm/anaconda3/envs/scanpy_test/lib/python3.7/site-packages/scanpy/logging.py", line 161, in print_versions
sinfo(dependencies=True)
File "/home/sturm/anaconda3/envs/scanpy_test/lib/python3.7/site-packages/sinfo/main.py", line 198, in sinfo
mod_version = _find_version(mod.version)
File "/home/sturm/anaconda3/envs/scanpy_test/lib/python3.7/site-packages/sinfo/main.py", line 42, in _find_versionreturn mod_version_attr()
TypeError: version() missing 1 required positional argument: 'distribution_name'
According to the importlib_metadata changelog, the __version__ attribute has been removed from the package:
=========================
importlib_metadata NEWS
=========================
v2.0.0
======
* ``importlib_metadata`` no longer presents a
``__version__`` attribute. Consumers wishing to
resolve the version of the package should query it
directly with
``importlib_metadata.version('importlib-metadata')``.
Closes #71.
Activity
grst commentedon Sep 30, 2020
While trying to fix it, I figured that the problem is upstream in
sinfo.Here's the issue I created:
https://gitlab.com/joelostblom/sinfo/-/issues/8
Feel free to close, or keep open until the problem is solved there.
Switch from print_version to print_header in tutorial.