sissbruecker / linkding

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.
MIT License
5.36k stars 263 forks source link

Internal Server Error's caused by missing module #654

Closed Eamourinho closed 2 months ago

Eamourinho commented 4 months ago

Have been using linkding w/o issue for months now, and after seeing the recent SSO changes decided to update to the latest docker version. Unfortunately I can't get things to work now, getting "Internal Server Error" on every page load attempt, looking at the container logs I see this in the beginning when building a new container from the sissbruecker/linkding:latest image:

Traceback (most recent call last):
  File "/etc/linkding/manage.py", line 21, in <module>
    main()
  File "/etc/linkding/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/opt/venv/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/venv/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/opt/venv/lib/python3.10/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
  File "/usr/local/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 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_generate_secret_key'

Health checks look like this:

[pid: 24|app: -1|req: -1/9] 127.0.0.1 () {28 vars in 306 bytes} [Sun Mar 17 01:41:45 2024] GET /health => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---

Any idea what I might be messing up here? ':D

sissbruecker commented 4 months ago

I just gave it a try, and creating a new container works for me.

Looking at the logs it breaks when initializing the INSTALLED_APPS, which references the django_generate_secret_key library, which is not installed. That should not happen, the library has been removed, and the INSTALLED_APPS have been updated in the same commit: https://github.com/sissbruecker/linkding/commit/38204c87cf6fdd3d871a115d9786db73b17d1be6

Do you have any customizations for the container, like mounting a custom settings file? Something is causing the library to still be listed in your settings.

sissbruecker commented 2 months ago

Closing as stale