fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
144 stars 30 forks source link

module 'packaging.version' has no attribute 'LegacyVersion' #134

Closed sorenwacker closed 4 months ago

sorenwacker commented 4 months ago

I used dash_uploader==0.7.0a1 and it seems to install fine, but when starting the app I get this strange error. Have you encoutered this before? On MacOS (M2 Pro).

Traceback (most recent call last):
  File "/Users/sdrwacker/workspace/ms-mint-app/scripts/Mint.py", line 146, in <module>
    register_callbacks(app, cache, fsc)
  File "/Users/sdrwacker/workspace/ms-mint-app/ms_mint_app/app.py", line 208, in register_callbacks
    plugin.callbacks(app=app, fsc=fsc, cache=cache)
  File "/Users/sdrwacker/workspace/ms-mint-app/ms_mint_app/plugins/ms_files.py", line 37, in callbacks
    callbacks(app, fsc, cache)
  File "/Users/sdrwacker/workspace/ms-mint-app/ms_mint_app/plugins/ms_files.py", line 254, in callbacks
    def upload_completed(status):
  File "/Users/sdrwacker/miniforge3/envs/mint/lib/python3.9/site-packages/dash_uploader/callbacks.py", line 105, in add_callback
    if dash_version_is_at_least("1.12"):
  File "/Users/sdrwacker/miniforge3/envs/mint/lib/python3.9/site-packages/dash_uploader/utils.py", line 20, in dash_version_is_at_least
    if isinstance(dash_version, version.LegacyVersion):
AttributeError: module 'packaging.version' has no attribute 'LegacyVersion'
sorenwacker commented 4 months ago

I tried

python -m pip install dash-uploader --pre
sorenwacker commented 4 months ago
      - dash==2.17.0
      - dash-bootstrap-components==1.6.0
      - dash-core-components==2.0.0
      - dash-extensions==0.1.3
      - dash-html-components==2.0.0
      - dash-table==5.0.0
      - dash-tabulator==0.4.2
      - dash-uploader==0.7.0a1
fohrloop commented 4 months ago

This looks the same as https://github.com/fohrloop/dash-uploader/issues/111 - do you think this one can be closed..?

sorenwacker commented 4 months ago

Due to packages version. Installed 21.0 fixed it.