'pyxattr' Error updating cyberpanel

Hi, ran update script and got error. I got Ubuntu 22.04.4

 Running setup.py install for py3dns ... done
  Running setup.py install for IPy ... done
  Running setup.py install for backports.ssl-match-hostname ... done
  Running setup.py install for tornado ... done
  Running setup.py install for pyxattr ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyxattr did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-utqvjxhc/pyxattr_77eda1e64ca54fc6b9fbfd539781100a/setup.py", line 22, in <module>
          setup(name = "pyxattr",
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 146, in setup
          _setup_distribution = dist = klass(attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 278, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 286, in __init__
          self.finalize_options()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 630, in finalize_options
          ep(self)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 650, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 173, in load
          return functools.reduce(getattr, attrs, module)
      AttributeError: module 'setuptools.dist' has no attribute 'check_test_suite'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyxattr

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
above command failed...
Collecting ConfigArgParse==1.2.3
  Using cached ConfigArgParse-1.2.3.tar.gz (42 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-de5cz85k/configargparse_8acfd7657cfb46439ac09e066d44443c/setup.py", line 77, in <module>
          setup(
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 146, in setup
          _setup_distribution = dist = klass(attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 278, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 286, in __init__
          self.finalize_options()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 630, in finalize_options
          ep(self)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 650, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 173, in load
          return functools.reduce(getattr, attrs, module)
      AttributeError: module 'setuptools.dist' has no attribute 'check_test_suite'
      [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...

I am researching on this, for now if you run

pip install -r /usr/local/requirments.txt --ignore-installed

And re-run the upgrade it should fix the problem, but this needs more checking.

Exactly the same thing happened (same error log) when I tried to upgrade - luckily the fix worked …

Hi,

Sorry for delay regarding to update in this matter due to a family emergecny.

I’ve made some changes to the code, it looks like ubunty was having an issue with python virtualenv.

Please upgrade and see if anyone again faces issue, our team is here to help resolve if anyone faces any further problem.

Upgrade using: 02 - Upgrading CyberPanel

thank you

Thank you for responding, running this command:

sudo su - -c “sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)”

has now broken cyberpanel. Websites are still running but panel is completely dead.

Here is the log:
MySQLdb._exceptions.OperationalError: (1045, “Access denied for user ‘cyberpanel’@‘localhost’ (using password: YES)”)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/root/cyberpanel_upgrade_tmp/upgrade.py”, line 3518, in
main()
File “/root/cyberpanel_upgrade_tmp/upgrade.py”, line 3514, in main
Upgrade.upgrade(args.branch)
File “/root/cyberpanel_upgrade_tmp/upgrade.py”, line 3416, in upgrade
Upgrade.UpdateConfigOfCustomACL()
File “/root/cyberpanel_upgrade_tmp/upgrade.py”, line 3052, in UpdateConfigOfCustomACL
for acl in ACL.objects.all():
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/models/query.py”, line 287, in iter
self._fetch_all()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/models/query.py”, line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/models/query.py”, line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/models/sql/compiler.py”, line 1154, in execute_sql
cursor = self.connection.cursor()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/base/base.py”, line 259, in cursor
return self._cursor()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/base/base.py”, line 235, in _cursor
self.ensure_connection()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/base/base.py”, line 218, in ensure_connection
with self.wrap_database_errors:
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/utils.py”, line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/base/base.py”, line 200, in connect
self.connection = self.get_new_connection(conn_params)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/django/db/backends/mysql/base.py”, line 234, in get_new_connection
return Database.connect(**conn_params)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1045, “Access denied for user ‘cyberpanel’@‘localhost’ (using password: YES)”)
above command failed…

Ticket placed here:
https://platform.cyberpersons.com/support/R7BPFWUIW/

This does not seem related to current issue.

But @shoaibkk please help look into this ticket.

Thank you for looking into this.

About upgrades - I use this normally:

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

but you recommended this instead:

sudo su - -c “sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)”

Is there a difference?

Is there a command that would force upgrade and reinstall all dependencies in cases like this where it completely breaks :8090 ?

I recommend first one if running as root

Thank you. That has been that one I have used for 4 years successfully.

This is all from this thread:

not sure how to re-create the condition but its breaking the upgrade script

burned hours today because the fastest solution with cyberpanel support is to just reinstall cyberpanel - I realize time differences around the world