CloudLinux Python Selector Fails
Hello
We are encountering a critical error with the Python Selector on our CloudLinux + cPanel server.
When executing the Python Selector, we receive the following traceback:
how to resolve it?
IndexError: string index out of range Traceback (most recent call last): File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselector/cl_selector.py", line 193, in run self._opts = self._parse_args(argv) ^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselector/cl_selector.py", line 554, in _parse_args status, data = parse_cloudlinux_selector_opts( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselector/cl_selector_arg_parse.py", line 322, in parse_cloudlinux_selector_opts selector_status = list(lib.get_selector_status().values())[0] ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselector/selectorlib.py", line 487, in get_selector_status return self.get_python_selector_status() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselector/selectorlib.py", line 322, in get_python_selector_status if PythonManager().selector_enabled: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/baseclselect/selector_manager.py", line 38, in selector_enabled return self.cfg.selector_enabled ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/baseclselect/config.py", line 143, in selector_enabled return self.Cfg.selector_enabled and bool(self.pkg.installed_versions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/baseclselect/pkgmanager.py", line 116, in installed_versions self._versions_info = self._scan_interpreter_versions() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectpython/pkgmanager.py", line 64, in _scan_interpreter_versions return scan_python_versions() ^^^^^^^^^^^^^^^^^^^^^^ File "/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectpython/__init__.py", line 58, in scan_python_versions maj_ver = f'{maj_ver[0]}.{maj_ver[1:]}' ~~~~~~~^^^IndexError: string index out of range


-
Hey there! This specific page is part of the CloudLinux set of tools on the server, and I'm not finding this exact error on my end. It would likely be best to reach out to either CloudLinux directly or your license provider so they can check the server and determine the root cause of the issue.
0 -
I solved it by running these commands.
Try it and let me know.
dnf update cloudlinux-release
cagefsctl --force-update
cagefsctl --remount-all
systemctl restart cagefs
yum reinstall alt-python* clselector lve-utils lvemanager
yum update alt-python* clselector lve-utils lvemanager0 -
Hi
Thanks to Jesus Suarez for sharing the solution.0 -
I had the same issue after a CloudLinux update reinstalling
lvemanagerand updating CageFS resolved it for me. Make sure to runcagefsctl --force-updateafterwards, or the selector may still fail.So you did what I said. I'm glad my solution worked for you.
0
Please sign in to leave a comment.
Comments
4 comments