civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

ModuleNotFoundError: No module named 'joblib.my_exceptions' #468

Closed billylaing closed 6 months ago

billylaing commented 1 year ago

With the latest release of joblib@1.3.1 the "my_exceptions" module was deprecated/removed.

Traceback (most recent call last):
  File "/Users/blaing/Workspace/avl/archive-tables/src/archive_tables.py", line 4, in <module>
    from civis.io import civis_to_csv, query_civis
  File "/Users/blaing/.local/share/virtualenvs/archive-tables-P6xH7wLS/lib/python3.10/site-packages/civis/__init__.py", line 4, in <module>
    from civis import io, ml, parallel, utils
  File "/Users/blaing/.local/share/virtualenvs/archive-tables-P6xH7wLS/lib/python3.10/site-packages/civis/parallel.py", line 17, in <module>
    from joblib.my_exceptions import TransportableException
ModuleNotFoundError: No module named 'joblib.my_exceptions'

This library is required by civis@1.16.0 but will break if joblib > 1.2 is installed.

https://github.com/civisanalytics/civis-python/blob/34ed2de06f1151f5d4e10af121007efdd04178bf/requirements.txt#L6

jacksonlee-civis commented 1 year ago

Hello, thanks for reporting this issue. For now, you'll have to pin joblib at < 1.3.0 as a workaround. We're working on updating civis-python for the recent joblib changes -- more to come!

billylaing commented 1 year ago

Thanks. Y'all would probably know best based on usage and numbers of users installing, but this seems like a really good opportunity for a patch.

I'd be happy to make a PR to patch requirements.txt until the more extensive updates for joblib changes lands. Thoughts?

billylaing commented 1 year ago

Ah, I see, someone has already created one:

https://github.com/civisanalytics/civis-python/pull/466

jacksonlee-civis commented 1 year ago

We've just released civis 1.16.1 on PyPI with joblib pinned at < 1.3.0, though I think we can leave this issue open since the 1.16.1 release was directly based off of 1.16.0 from Dec 2021 (we've started checking in API-breaking changes since 1.16.0). On the main branch right now (at 34ed2de06f1151f5d4e10af121007efdd04178bf), this joblib issue is still outstanding.

billylaing commented 1 year ago

Thanks @jacksonlee-civis

Appreciate the release!

mattyb commented 1 year ago

Resolved by #467

mattyb commented 1 year ago

Sorry, just saw @jacksonlee-civis 's comment about leaving this open for the main branch! reopening.

jacksonlee-civis commented 4 months ago

Update: civis-python v2.3.0 is now available, where joblib is pinned at >= 1.3.0.