Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian12 - Can't install fir_notification plugin #327

Closed
ggambini opened this issue Dec 26, 2024 · 2 comments · Fixed by #328
Closed

Debian12 - Can't install fir_notification plugin #327

ggambini opened this issue Dec 26, 2024 · 2 comments · Fixed by #328

Comments

@ggambini
Copy link

Hello

Like issue #313, i cant activate notification plugin on a debian 12.5 (Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux), when i run ./manage.py migrate --settings fir.config.production, i get this error :

(env-FIR) www-data@toto:/opt/fir/FIR$ ./manage.py migrate --settings fir.config.production
Traceback (most recent call last):
  File "/opt/fir/FIR/./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/fir/FIR/fir_notifications/models.py", line 80, in <module>
    class MethodConfiguration(models.Model):
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/db/models/base.py", line 143, in __new__
    new_class.add_to_class("_meta", Options(meta, app_label))
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/db/models/base.py", line 371, in add_to_class
    value.contribute_to_class(cls, name)
  File "/opt/fir/env-FIR/lib/python3.11/site-packages/django/db/models/options.py", line 220, in contribute_to_class
    raise TypeError(
TypeError: 'class Meta' got invalid attribute(s): index_together

If i remove fir_notification in fir/config/installed_apps.txt, manage.py commands work fine. I will try to find which dependancu is missing. Actually i have this packages installed (same as your install documentation, just change mysql to mariadb) :
mariadb-server default-libmysqlclient-dev gettext python3-dev python3-pip python3-lxml git libxml2-dev libxslt1-dev libz-dev nginx pkg-config python-is-python3 python3-virtualenv redis libsasl2-dev libldap2-dev

Regards, Gilian.

@Augustin-FL
Copy link
Collaborator

Hi
Good catch, thanks for reporting it.

This issue is django5 related.
I will push a fix, but if you encounter other issues related to django5 you can downgrade your django version like this:

sudo -u www-data bash
source /opt/fir/env-FIR/bin/activate
pip install 'django<5.0'

@Augustin-FL
Copy link
Collaborator

(Feel free to re-open the issue if you still have problems to use or setup fir_notifications)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants