mljar / mercury

Convert Jupyter Notebooks to Web Apps
https://RunMercury.com
GNU Affero General Public License v3.0
3.86k stars 242 forks source link

ModuleNotFoundError when executing #266

Closed isthisthat closed 1 year ago

isthisthat commented 1 year ago

Hello I'm getting the following stack trace when running mercury:

$ mercury run demo
Traceback (most recent call last):
  File "/home/bob/.local/bin/mercury", line 8, in <module>
    sys.exit(main())
  File "/home/bob/.local/lib/python3.10/site-packages/mercury/mercury.py", line 117, in main
    execute_from_command_line(["mercury.py", "migrate", "-v", 0])
  File "/home/bob/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/home/bob/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/home/bob/.local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/bob/.local/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/home/bob/.local/lib/python3.10/site-packages/django/apps/config.py", line 123, in create
    mod = import_module(mod_path)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/bob/.local/lib/python3.10/site-packages/daphne/apps.py", line 6, in <module>
    import daphne.server  # noqa: F401
  File "/home/bob/.local/lib/python3.10/site-packages/daphne/server.py", line 36, in <module>
    from twisted.internet.endpoints import serverFromString
  File "/home/bob/.local/lib/python3.10/site-packages/twisted/internet/endpoints.py", line 63, in <module>
    from twisted.python.systemd import ListenFDs
  File "/home/bob/.local/lib/python3.10/site-packages/twisted/python/systemd.py", line 18, in <module>
    from attrs import Factory, define
ModuleNotFoundError: No module named 'attrs'

OS: Ubuntu 22.04.1 LTS python: Python 3.10.6 Package versions: amqp 5.1.1 anyio 3.6.1 appdirs 1.4.4 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 asgiref 3.6.0 asttokens 2.0.8 attrs 21.2.0 autobahn 23.1.2 Automat 20.2.0 Babel 2.8.0 backcall 0.2.0 bcrypt 3.2.0 beautifulsoup4 4.11.1 billiard 3.6.4.0 biopython 1.81 bleach 5.0.1 blinker 1.4 boto3 1.26.83 botocore 1.29.130 celery 5.2.7 certifi 2023.5.7 cffi 1.15.1 channels 4.0.0 chardet 4.0.0 charset-normalizer 3.1.0 click 8.0.3 click-didyoumean 0.3.0 click-plugins 1.1.1 click-repl 0.2.0 cloud-init 23.1.2 colorama 0.4.4 command-not-found 0.3 configobj 5.0.6 constantly 15.1.0 contourpy 1.0.7 croniter 1.3.14 cryptography 40.0.2 cutadapt 4.2 cycler 0.11.0 daphne 4.0.0 dbus-python 1.2.18 debugpy 1.6.3 decorator 5.1.1 defusedxml 0.7.1 distlib 0.3.6 distro 1.7.0 distro-info 1.1build1 dj-rest-auth 3.0.0 Django 4.2 django-allauth 0.52.0 django-cors-headers 3.10.1 django-drf-filepond 0.4.1 django-filter 21.1 django-storages 1.13.2 djangorestframework 3.14.0 dnaio 0.10.0 docutils 0.19 entrypoints 0.4 et-xmlfile 1.1.0 execnb 0.1.5 executing 1.0.0 fastcore 1.5.29 fastjsonschema 2.16.1 filelock 3.8.0 flash 1.0.3 fonttools 4.39.3 gevent 22.10.2 greenlet 2.0.2 httplib2 0.20.2 hyperlink 21.0.0 idna 3.3 igraph 0.10.4 importlib-metadata 4.6.4 incremental 21.3.0 ipykernel 6.15.3 ipython 8.5.0 ipython-genutils 0.2.0 ipywidgets 8.0.3 isal 1.1.0 jedi 0.18.1 jeepney 0.7.1 Jinja2 3.0.3 jmespath 1.0.1 json5 0.9.10 jsonpatch 1.32 jsonpointer 2.0 jsonschema 3.2.0 jupyter_client 7.3.5 jupyter-core 4.11.1 jupyter-server 1.18.1 jupyterlab 3.4.7 jupyterlab-pygments 0.2.2 jupyterlab_server 2.15.1 jupyterlab-widgets 3.0.7 keyring 23.5.0 kiwisolver 1.4.4 kombu 5.2.4 launchpadlib 1.10.16 lazr.restfulclient 0.14.4 lazr.uri 1.0.6 lxml 4.9.1 Markdown 3.3.6 MarkupSafe 2.0.1 matplotlib 3.7.1 matplotlib-inline 0.1.6 mercury 2.2.9 mistune 2.0.4 more-itertools 8.10.0 nbclassic 0.4.3 nbclient 0.6.8 nbconvert 7.0.0 nbformat 5.5.0 nest-asyncio 1.5.5 netifaces 0.11.0 notebook 6.4.12 notebook-shim 0.1.0 numpy 1.23.3 oauthlib 3.2.0 openpyxl 3.1.2 packaging 21.3 pandas 1.4.4 pandocfilters 1.5.0 parso 0.8.3 pepfun 2.0 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 22.0.2 platformdirs 2.5.2 plotly 5.10.0 prometheus-client 0.14.1 prompt-toolkit 3.0.31 psutil 5.9.2 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.4.8 pyasn1-modules 0.2.1 pycparser 2.21 pyee 8.2.2 pyfastx 1.0.1 Pygments 2.13.0 PyGObject 3.42.1 PyHamcrest 2.0.2 PyJWT 2.3.0 pyOpenSSL 23.1.1 pyparsing 2.4.7 pyppeteer 1.0.2 pyrsistent 0.18.1 pyserial 3.5 python-apt 2.3.0+ubuntu2.1 python-dateutil 2.8.2 python-debian 0.1.43ubuntu1 python-dotenv 1.0.0 python-magic 0.4.24 python3-openid 3.2.0 pytz 2022.1 PyYAML 6.0 pyzmq 23.2.1 rdkit 2023.3.1 requests 2.30.0 requests-oauthlib 1.3.1 s3transfer 0.6.1 scipy 1.9.1 SecretStorage 3.3.1 Send2Trash 1.8.0 service-identity 18.1.0 setuptools 59.6.0 shortuuid 1.0.11 six 1.16.0 sniffio 1.3.0 sos 4.4 soupsieve 2.3.2.post1 sphinx-jsonschema 1.19.1 SQLAlchemy 1.4.27 sqlparse 0.4.4 ssh-import-id 5.11 stack-data 0.5.0 systemd-python 234 tenacity 8.0.1 terminado 0.15.0 texttable 1.6.7 tinycss2 1.1.1 tomli 2.0.1 tornado 6.2 tqdm 4.65.0 traitlets 5.4.0 Twisted 22.10.0 txaio 23.1.1 typing_extensions 4.5.0 ubuntu-advantage-tools 27.12 ubuntu-drivers-common 0.0.0 ufw 0.36.1 unattended-upgrades 0.1 urllib3 1.26.5 vine 5.0.0 virtualenv 20.16.5 wadllib 1.3.6 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.5.1 websockets 10.4 wheel 0.37.1 whitenoise 6.4.0 widgetsnbextension 4.0.7 xkit 0.0.0 xopen 1.7.0 zipp 1.0.0 zope.event 4.6 zope.interface 5.4.0

Thank you for your help.

isthisthat commented 1 year ago

pip3 install attrs --upgrade seems to have fixed it