Opened 5 years ago

Closed 5 years ago

#60222 closed defect (fixed)

py-astroquery missing dependency

Reported by: odysseus9672 (Sean Lake) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: py-astroquery py-keyring

Description

I have installed py37-astroquery. When I try to run the following command

from astroquery.irsa import Irsa

I get a ModuleNotFoundError for importlib_metadata. Installing py37-importlib-metadata fixes the error.

Change History (2)

comment:1 Changed 5 years ago by reneeotten (Renee Otten)

Owner: set to reneeotten
Port: py-astroquery py-keyring added
Status: newaccepted

hi Sean, sorry for the trouble. When trying to reproduce your error I got the following backtrace:

>>> from astroquery.irsa import Irsa
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keyring/backend.py", line 11, in <module>
    from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astroquery/irsa/__init__.py", line 34, in <module>
    from .core import Irsa, IrsaClass
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astroquery/irsa/core.py", line 111, in <module>
    from ..query import BaseQuery
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astroquery/query.py", line 9, in <module>
    import keyring
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keyring/core.py", line 10, in <module>
    from . import backend
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keyring/backend.py", line 13, in <module>
    import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'

so even though it manifests itself when doing an import for the astroquery, it is, in fact, caused by py-keyring and I checking that I see that I didn't update its dependencies correctly. Will fix shortly.

Thanks for the report!

comment:2 Changed 5 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: acceptedclosed

In eb7831554e2613e4214e1f207d0b7d5995f0bbee/macports-ports (master):

py-keyring: fix dependencies

Closes: #60222

Note: See TracTickets for help on using tickets.