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

ImportError: cannot import name 'SafeFunction' from 'joblib.parallel' #73

Closed
FalsoMoralista opened this issue Jul 13, 2023 · 2 comments
Closed

Comments

@FalsoMoralista
Copy link

It seems that it crashes for joblib (1.3.1).
Downgrading to 0.10.0 seemed to solve the issue (pescadores/pescador#26)

Sample code:

import gbif_dl

data_generator = gbif_dl.dwca.generate_urls(
    "10.15468/dl.pcxfa5", dwca_root_path="dwcas", label="speciesKey"
)
stats = gbif_dl.io.download(data_generator, root="my_dataset", retries=1000000)

Error:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import gbif_dl
  File "/home/rtcalumby/miniconda3/envs/py38/lib/python3.8/site-packages/gbif_dl/__init__.py", line 15, in <module>
    from .generators import api
  File "/home/rtcalumby/miniconda3/envs/py38/lib/python3.8/site-packages/gbif_dl/generators/api.py", line 9, in <module>
    import pescador
  File "/home/rtcalumby/miniconda3/envs/py38/lib/python3.8/site-packages/pescador/__init__.py", line 8, in <module>
    from .zmq_stream import *
  File "/home/rtcalumby/miniconda3/envs/py38/lib/python3.8/site-packages/pescador/zmq_stream.py", line 33, in <module>
    from joblib._parallel_backends import SafeFunction
ImportError: cannot import name 'SafeFunction' from 'joblib._parallel_backends' (/home/rtcalumby/miniconda3/envs/py38/lib/python3.8/site-packages/joblib/_parallel_backends.py)

@faroit
Copy link
Contributor

faroit commented Jul 14, 2023

Thanks for the update. So we should update the requirements of joblib or pescador?

@FalsoMoralista
Copy link
Author

Thanks for the update. So we should update the requirements of joblib or pescador?

I guess that updating the requirements, although I didn't tested for versions for joblib between 0.10 and 1.3.1 - perhaps there are a bunch of more recent versions other than 1.3.1 still working. Probably there's an incompatibility between pescador and joblib 1.3.1.

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

No branches or pull requests

2 participants