Python Selector error - IndexError: string index out of range

Overview

After a recent CloudLinux update, the Python Selector and other Selector-related features may stop working in cPanel or via the command line.
Administrators may encounter errors such as:

Error in Python application
IndexError: string index out of range
Traceback (most recent call last):
...

In addition, the LVE Manager service (lvemanager) may show as:

  • Not running (inactive (dead)), or

  • Producing JSON-related errors.


Root Cause

The issue is caused by a faulty lvemanager package release:

lvemanager.noarch 7.11.24-1.el8.cloudlinux

This version is missing critical configuration and cache files, including:

  • /usr/share/l.v.e-manager/lvemanager/cache/users.json

  • /usr/share/l.v.e-manager/panelless-version/lvemanager/config.json

Because of these missing files, Python Selector and other services depending on lvemanager cannot function properly.


Diagnosis

  1. Check the status of the LVE Manager service:

    systemctl status lvemanager
    

    Expected output:

    inactive (dead)
    
  2. Check for missing cache or configuration files:

    ls /usr/share/l.v.e-manager/lvemanager/cache/
    

    Output will likely show that the directory does not exist.

  3. Confirm the installed package version:

    yum --enablerepo=* list lvemanager --showduplicates | grep 7.11.24
    

    Example output:

    lvemanager.noarch 7.11.24-1.el8.cloudlinux cloudlinux-updates-testing
    

This confirms the server is running the problematic version from the cloudlinux-updates-testing repository.


Solution

Step 1 — Remove the broken package

yum remove lvemanager -y 

Step 2 — Install the stable version

yum install lvemanager-7.11.23 --enablerepo=cloudlinux-x86_64-server-8 -y

If needed, the RPM can also be downloaded manually from a working server or a CloudLinux mirror.

Step 3 — Restart services

systemctl restart lvemanager
cagefsctl --force-update

Verification

After completing the steps above:

  • The lvemanager service should start normally:

    systemctl status lvemanager
    
  • Python Selector should function correctly in both cPanel and the CLI.

  • The IndexError: string index out of range will no longer appear.


Recommendations

  • Do not enable or use the cloudlinux-updates-testing repository on production servers unless specifically instructed.

  • Test package updates in a staging environment before applying them to production systems.

  • Refer to the CloudLinux changelog for details on recent releases.


Affected version: lvemanager-7.11.24-1.el8.cloudlinux
Resolved by: Downgrading to lvemanager-7.11.23

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix lveinfo database error of CLN

Run the following command: service lvestats stoptar -zcvf /root/lveinfo_backup_$(date...

How to Install KernelCare on cPanel/WHM server

To install KernelCare, you need to log in with the root user on your cPanel server. Check for...

Switching all cPanel acc/s to "inherit" PHP version

You can change all cPanel users to inherit with this CLI command: for each in `cat...

How to fix issues like PHP selector not available

Some of our clients face the issues like "PHP selector not available" on cPanel accounts of their...

How to fix boot problem because of CLN kernel

Some of our clients contacted us recently about the boot problem of their server after installing...