Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

AttributeError: module 'packaging.version' has no attribute 'LegacyVersion' #111

@meghna200

Description

@meghna200

I have hosted my dash app on AWS using a DockerFile. While trying to deploy the app, I am getting an error which I am guessing is with the dash_uploader component

the error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/docker-test/src/main.py", line 41, in <module>
    from modules.pydash_components.pages.main_pages.data_page.data_load import data_load_layout
  File "/docker-test/src/modules/pydash_components/pages/main_pages/data_page/data_load.py", line 169, in <module>
    def callback_on_completion(status: du.UploadStatus):
  File "/usr/local/lib/python3.9/site-packages/dash_uploader/callbacks.py", line 105, in add_callback
    if dash_version_is_at_least("1.12"):
  File "/usr/local/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'

I am using the following dash versions:

python==3.9.12
dash==2.7.0
dash_bootstrap_components==1.0.3
dash_extensions==0.1.7
dash_table==5.0.0
dash_uploader==0.7.0a1

any idea how I can resolve this without deprecating any packages?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions