Unable to run rasa x - Value Error: invalid literal for int() with base 10: '3600m'

Hello there,

A few days ago I managed to run the official rasa 0.33 image with my custom rasa 2.0 image, but now I’m getting the following error when trying to deploy my stack:

rasa-x_1           | Traceback (most recent call last):
rasa-x_1           |   File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
rasa-x_1           |     "__main__", mod_spec)
rasa-x_1           |   File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
rasa-x_1           |     exec(code, run_globals)
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/__main__.py", line 10, in <module>
rasa-x_1           |     import rasax.community.utils.common as common_utils
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/utils/common.py", line 50, in <module>
rasa-x_1           |     import rasax.community.utils.cli as cli_utils
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/utils/cli.py", line 11, in <module>
rasa-x_1           |     import rasax.community.utils.config as config_utils
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/utils/config.py", line 6, in <module>
rasa-x_1           |     import rasax.community.utils.io as io_utils
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/utils/io.py", line 12, in <module>
rasa-x_1           |     import rasax.community.config as rasa_x_config
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/config.py", line 140, in <module>
rasa-x_1           |     os.environ.get("SANIC_RESPONSE_TIMEOUT", "28800")
rasa-x_1           | ValueError: invalid literal for int() with base 10: '3600m'

Has anyone faced the same issue and managed to solve it?

@dgslv did you try to set the SANIC_RESPONSE_TIMEOUT parameter or have an env var named that already? You can check by running the env param. If so, it should be an integer.

2 Likes

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 . The other way to overcome this issue is to wrap your code inside a Python try…except block to handle this error.

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

Forgot to mention here. Thanks for your help

1 Like