CyberPanel v2.3.2: Update to v2.3.9 failed

I have attached the logs below

Using cached tornado-6.4.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (436 kB)
Using cached validators-0.33.0-py3-none-any.whl (43 kB)
Using cached websocket_client-1.8.0-py3-none-any.whl (58 kB)
Using cached cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (446 kB)
Using cached psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (287 kB)
Using cached pyotp-2.9.0-py3-none-any.whl (13 kB)
Using cached asgiref-3.8.1-py3-none-any.whl (23 kB)
Using cached cachetools-5.5.0-py3-none-any.whl (9.5 kB)
Using cached certifi-2024.12.14-py3-none-any.whl (164 kB)
Using cached charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (146 kB)
Using cached filelock-3.16.1-py3-none-any.whl (16 kB)
Using cached httplib2-0.22.0-py3-none-any.whl (96 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
Using cached proto_plus-1.25.0-py3-none-any.whl (50 kB)
Using cached protobuf-5.29.2-cp38-abi3-manylinux2014_x86_64.whl (319 kB)
Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Using cached pyasn1_modules-0.4.1-py3-none-any.whl (181 kB)
Using cached PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached requests_file-2.1.0-py2.py3-none-any.whl (4.2 kB)
Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB)
Using cached rsa-4.9-py3-none-any.whl (34 kB)
Using cached soupsieve-2.6-py3-none-any.whl (36 kB)
Using cached uritemplate-4.1.1-py2.py3-none-any.whl (10 kB)
Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Using cached jsonlines-4.0.0-py3-none-any.whl (8.7 kB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Using cached attrs-24.3.0-py3-none-any.whl (63 kB)
Using cached pyasn1-0.6.1-py3-none-any.whl (83 kB)
Using cached pyparsing-3.2.1-py3-none-any.whl (107 kB)
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: ptyprocess, ipaddress, websocket-client, validators, urllib3, uritemplate, typing-extensions, tornado, sqlparse, soupsieve, six, PyYAML, pyparsing, pyotp, pycparser, pyasn1, py3dns, psutil, protobuf, pexpect, oauthlib, mysqlclient, jmespath, idna, filelock, charset-normalizer, certifi, cachetools, bcrypt, attrs, rsa, requests, python-dateutil, pyasn1-modules, proto-plus, jsonlines, httplib2, googleapis-common-protos, cffi, beautifulsoup4, asgiref, requests-oauthlib, requests-file, pynacl, google-auth, docker, Django, cryptography, cloudflare, botocore, tldextract, s3transfer, pyOpenSSL, paramiko, google-auth-oauthlib, google-auth-httplib2, google-api-core, google-api-python-client, boto3
Successfully installed Django-4.2.14 PyYAML-6.0.1 asgiref-3.8.1 attrs-24.3.0 bcrypt-4.2.0 beautifulsoup4-4.12.3 boto3-1.34.153 botocore-1.34.153 cachetools-5.5.0 certifi-2024.12.14 cffi-1.17.1 charset-normalizer-3.4.1 cloudflare-2.20.0 cryptography-43.0.0 docker-7.1.0 filelock-3.16.1 google-api-core-2.19.1 google-api-python-client-2.139.0 google-auth-2.32.0 google-auth-httplib2-0.2.0 google-auth-oauthlib-1.2.1 googleapis-common-protos-1.63.2 httplib2-0.22.0 idna-3.10 ipaddress-1.0.23 jmespath-1.0.1 jsonlines-4.0.0 mysqlclient-2.2.6 oauthlib-3.2.2 paramiko-3.4.1 pexpect-4.9.0 proto-plus-1.25.0 protobuf-5.29.2 psutil-6.1.1 ptyprocess-0.7.0 py3dns-4.0.2 pyOpenSSL-24.2.1 pyasn1-0.6.1 pyasn1-modules-0.4.1 pycparser-2.22 pynacl-1.5.0 pyotp-2.9.0 pyparsing-3.2.1 python-dateutil-2.9.0.post0 requests-2.32.3 requests-file-2.1.0 requests-oauthlib-2.0.0 rsa-4.9 s3transfer-0.10.2 six-1.17.0 soupsieve-2.6 sqlparse-0.5.1 tldextract-5.1.2 tornado-6.4.1 typing-extensions-4.12.2 uritemplate-4.1.1 urllib3-2.3.0 validators-0.33.0 websocket-client-1.8.0
--2025-01-06 10:57:50--  https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.3.9/plogical/upgrade.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8002::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 153709 (150K) [text/plain]
Saving to: ‘upgrade.py’

upgrade.py                       100%[==========================================================>] 150.11K  --.-KB/s    in 0.01s

2025-01-06 10:57:50 (10.6 MB/s) - ‘upgrade.py’ saved [153709/153709]

Traceback (most recent call last):
  File "/root/cyberpanel_upgrade_tmp/upgrade.py", line 16, in <module>
    from CyberCP import settings
  File "/usr/local/CyberCP/CyberCP/settings.py", line 14, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/translation/__init__.py)
created virtual environment CPython3.10.12.final.0-64 in 208ms
  creator CPython3Posix(dest=/usr/local/CyberPanelTemp, clear=False, no_vcs_ignore=False, global=True)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
    added seed packages: pip==24.3.1, setuptools==75.6.0, wheel==0.45.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
--2025-01-06 10:57:51--  https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.3.9/requirments-old.txt
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8003::154, 2606:50c0:8002::154, 2606:50c0:8001::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 584 [text/plain]
Saving to: ‘/usr/local/requirments-old.txt’

/usr/local/requirments-old.txt   100%[==========================================================>]     584  --.-KB/s    in 0s

2025-01-06 10:57:51 (52.3 MB/s) - ‘/usr/local/requirments-old.txt’ saved [584/584]

Collecting cffi==1.14.3 (from -r /usr/local/requirments-old.txt (line 1))
  Using cached cffi-1.14.3.tar.gz (470 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info
      writing /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-n4kjx9eo/cffi.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-xkmf95tl/cffi_c849b085b3a24feba9b0317408821756/setup.py", line 200, in <module>
          setup(
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/dist.py", line 995, in run_command
          super().run_command(command)
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 313, in run
          self.find_sources()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 321, in find_sources
          mm.run()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.prune_file_list()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/command/sdist.py", line 162, in prune_file_list
          super().prune_file_list()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/usr/local/CyberPanelTemp/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
above command failed...

The version I am using is 2.3.2 & I am trying to update to version 2.3.9.

which os are you using?

Hi,

Its Ubuntu 22.04 LTS

root@us2:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

I would advise against upgrading to the current stable version if you are more than two versions away from it.

Instead, I recommend restoring your server to the most reliable snapshot or backup you have and then performing the upgrade incrementally, one version at a time.

Let us know if you get any issues.