pretalx/prtx-faq

"No module named 'prtx_faq'" after installation

Closed this issue · 6 comments

Hi,

i tried to install the Plugin but pretix-web doesn´t restart afterwards. I think because of this errors of "python -m pretix migrate"

(venv) conimpro-pretix@immanuel:~$ pip install prtx-faq
Collecting prtx-faq
  Using cached prtx_faq-1.0.2-py3-none-any.whl (2.2 kB)
Installing collected packages: prtx-faq
Successfully installed prtx-faq-1.0.2
WARNING: There was an error checking the latest version of pip.
(venv) conimpro-pretix@immanuel:~$ python -m pretix migrate
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/pretix/__main__.py", line 30, in <module>
    execute_from_command_line(sys.argv)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
    django.setup()
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/apps/config.py", line 224, in create
    import_module(entry)
  File "/usr/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 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'prtx_faq'

Do you have an idea how to solve this issue?
Thanks a lot!

rixx commented

Huh. That's very weird – either it installs prtx-faq, in which case importing it shouldn't be a problem, or it doesn't install it, in which case it shouldn't lead to problems with migrate. Can you uninstall it and install it again using python -m pip install?

same:

(venv) conimpro-pretix@immanuel:~$ python -m pip install prtx-faq
Collecting prtx-faq
  Using cached prtx_faq-1.0.2-py3-none-any.whl (2.2 kB)
Installing collected packages: prtx-faq
Successfully installed prtx-faq-1.0.2
WARNING: There was an error checking the latest version of pip.
(venv) conimpro-pretix@immanuel:~$ python -m pretix migrate
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/pretix/__main__.py", line 30, in <module>
    execute_from_command_line(sys.argv)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
    django.setup()
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/home/conimpro-pretix/venv/lib/python3.9/site-packages/django/apps/config.py", line 224, in create
    import_module(entry)
  File "/usr/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 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'prtx_faq'
rixx commented

So can you import prtx_faq from a python shell?

mkaag commented

Very same error here with:

  • pretix v4.15.0
  • pip v23.1.2
  • Python v3.9.16

Same for me with the latest pretix docker image 2023.6.

Isn't it because __init__.py file is missing in prtx_faq directory ?