opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

RL8 Django 3 support ? ModuleNotFoundError: No module named 'django.utils.six' #677

Closed tjyang closed 1 year ago

tjyang commented 1 year ago

Hi I was to modify Makefile and adagio.spec files to compile el8 rpm for RockyLinux 8.7. status.py is still using django.utils.six.

google search shows[ in django3 django.utils.six is deprecated. ](R1: https://github.com/opinkerfi/adagios/blob/master/adagios/status/utils.py#L36)

[me@va32lnagios03 ~]$ cat /etc/redhat-release Rocky Linux release 8.7 (Green Obsidian) [me@va32lnagios03~]$ [me@va32lnagios03~]$ rpm -qa |grep django python-django3-bash-completion-3.2.19-1.el8.noarch python3-django3-3.2.19-1.el8.noarch [me@nagios03 ~]$ [me@nagios03~]$ python3 -m pdb /usr/lib/python3.6/site-packages/adagios/wsgi.py > /usr/lib/python3.6/site-packages/adagios/wsgi.py(1)() -> import os (Pdb) c Traceback (most recent call last): File "/usr/lib64/python3.6/pdb.py", line 1667, in main pdb._runscript(mainpyfile) File "/usr/lib64/python3.6/pdb.py", line 1548, in _runscript self.run(statement) File "/usr/lib64/python3.6/bdb.py", line 434, in run exec(cmd, globals, locals) File "", line 1, in File "/usr/lib/python3.6/site-packages/adagios/wsgi.py", line 1, in import os File "/usr/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/usr/lib/python3.6/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/usr/lib/python3.6/site-packages/django/apps/config.py", line 224, in create import_module(entry) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/lib/python3.6/site-packages/adagios/bi/__init__.py", line 32, in import adagios.status.utils File "/usr/lib/python3.6/site-packages/adagios/status/utils.py", line 36, in import django.utils.six ModuleNotFoundError: No module named 'django.utils.six' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /usr/lib/python3.6/site-packages/adagios/status/utils.py(36)() -> import django.utils.six (Pdb)
tjyang commented 1 year ago
tjyang commented 1 year ago

0 errors found May 14, 2023 - 08:22:59 Django version 1.6.11.7, using settings 'adagios.settings' Starting development server at http://0.0.0.0:55534/ Quit the server with CONTROL-C. [root@va32lnagios01 httpd]#