Honeybee+ error : Solution exception:invalid literal for int() with base 10: ''

Hello, Friends,

When I use some Honeybee+ components, such as HB+ surface and HB+ skyMatrix, the component will generate the following error:

        {0;0}
  1. Runtime error (ValueErrorException): invalid literal for int() with base 10: ‘’

Traceback:
line 114, in getversion, “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 114, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 123, in _find_open_studio_folder, “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 99, in open_studio_path, “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 53, in init, “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 251, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\config.py”
line 4, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\futil.py”
line 5, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\radiance\radfile.py”
line 10, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\surfaceproperties.py”
line 4, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee_hbanalysissurface.py”
line 1, in , “C:\Users\Administrator\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\honeybee\hbsurface.py”
line 50, in script

Anyone knows the reason?

Hello @SethLai , it seems that this topic can help you with this issue.

1 Like

I solved it. I revised the installation path of openstudio.

1 Like

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 .

val = "10.10"
if val.isdigit():
  print(int(val))

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”.