weird error on error logs (invalid literal for int() with base 10: 'wc:' [getErrorLogs])

Provider: OVH

Virtualization Type: KVM

System: Centos 7.5

OLS or Enterprise?

Installing from official server or mirror server?

Install Memcached extension for PHP?

Install LiteSpeed Memcached?

Install Memcached?

Install Redis extension for PHP?

Install Redis?


When I try to see error logs of a website it doesn't do anything, in cyberpanel Main log shows
invalid literal for int() with base 10: 'wc:' [getErrorLogs]
I don't know why.


  • Not important but its probably the system has not applied or your system has applied incorrect permissions on the log file.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    You can now earn with the Cyberhosting affiliate scheme. Join today
  • But it's important for server management. It's very important to know when errors appear and why. We have other methods to check the errors, OK we use it but, this is a bug and need to be solved.

    I encountered a similar issue (for access logs) on a fresh new install.
    On a new domain, configured after 2.0 update work well, but on a previous domain, configured on 1.9 Cyberpanel, we have the same issue.

    invalid literal for int() with base 10: 'wc:' [getAccessLogs]

    The error logs for as are not loaded at all for any websites. Nothing, no logs form.
    It appears to be hidden.

    Inspect HTML and I saw few resource errors in browser:
    Failed to load resource: the server responded with a status of 404 (Not Found)
  • [04.16.2020_10-00-01] list index out of range [startCalculations]
    [04.16.2020_10-05-50] invalid literal for int() with base 10: 'wc:' [getErrorLogs]

    same with me too.

    I don't know python much but will look into it as need it fixed asap.
  • The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an integer to the int() function . In other words it's either empty, or has a character in it other than a digit.

    You can solve this error by using Python isdigit() method to check whether the value is number or not. The returns True if all the characters are digits, otherwise False .

    if val.isdigit():

    The other way to overcome this issue is to wrap your code inside a Python try...except block to handle this error.

    Python2.x and Python3.x

    Sometimes the difference between Python2.x and Python3.x that leads to this ValueError: invalid literal for int() with base 10 .

    With Python2.x , int(str(3/2)) gives you "1". With Python3.x , the same gives you ("1.5"): ValueError: invalid literal for int() with base 10: "1.5".
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!