Bootstrap FreeKB - IBM WebSphere - ValueError: invalid literal for int() with base 10: 'x' with Configuration Comparison Tool (CCT)
IBM WebSphere - ValueError: invalid literal for int() with base 10: 'x' with Configuration Comparison Tool (CCT)

Updated:   |  IBM WebSphere articles

This assumes you have Installed WebSphere Configuration Comparison Tool (CCT) and created two or more dump files and you are attempting to create an HTML file using ConfigReport.py.

If the following traceback is displayed, this means that one of the configuration files contained an unexpected value.

Traceback (most recent call last):
  File "/path/to/ConfigReport.py", line 1835, in <module>
    ServerReport(report)
  File "/path/to/ConfigReport.py", line 1304 in ServerReport
    subReport[1](serverList)
  File "/path/to/ConfigReport.py", line 1014, in pmiServiceReportSrv
    reportPMIStatProviders(rptParms)
  File "/path/to/ConfigReport.py", line 710, in reportPMIStatProviders
    row.append(cu.getPMICellValue(cu.getPMIConfig(name,server)))
  File "/path/to/ConfigUtils.py", line 763, in getPMICellValue
    intVals.append(int(val))
ValueError: invalid literal for int() with base 10: 'x'

 

In the getPMICellValue subroutine of the ConfigUtils.py script, there is a line that expects the enable variable to contain a value of [].

if enable='[]':

 

In the configuration files being used to create the HTML files, if the enable variable always has a value of [], then the above traceback would not occur.

enable=[]

 

However, the enable variable in the configuration files may contain a value of ,None or a string of intergers (both positive and negative), like this.

enable=,None
enalbe=X
enable=10,11,-20,24

 

To address this, the ConfigUtils.py script can be updated with the following syntax.

if (enable=='[]' or enable==',None' or enable=='X' or re.match('^[0-9]', enable) or re.match('^-[0-9]', enable)): 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 7c6231 in the box below so that we can be sure you are a human.