Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing d1_client import to download_mn_objects #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r-b-g-b
Copy link

@r-b-g-b r-b-g-b commented Dec 17, 2024

Environment details

Python 3.12

pip freeze | grep dataone
: dataone.common==3.5.2
: dataone.libclient==3.5.2
: dataone.util==3.5.2

To reproduce

pip install dataone.util dataone.libclient
import d1_client
import d1_util
base_url = 'https://example.com/metacat/d1/mn'  # I used a real DataONE member node here
r = d1_util.download_mn_objects.MemberNodeObjectDownloader(base_url, '/home/robert/Downloads/mn_dl')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/robert/anaconda3/envs/cib/lib/python3.12/site-packages/d1_util/download_mn_objects.py", line 133, in __init__
    self._mn_client = d1_client.mnclient.MemberNodeClient(base_url)
                      ^^^^^^^^^
NameError: name 'd1_client' is not defined

I think it's as simple as a missing import d1_client.mnclient at the top of download_mn_objects. (The d1_client is already a requirement in setup.py.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant