Error in a sample from Botcity framework

Hello all,

I’m facing an issue regarding a simple sample copied from Botcity Dev Tools web page:

– Here is the tiny Phyton code, just copied and pasted:

from botcity.web import WebBot

def main():
# Instantiate the WebBot
bot = WebBot()

# Configure whether or not to run on headless mode
bot.headless = False

# Set the WebDriver path
bot.driver_path = "C:\webdriver\chromedriver.exe"

# Opens the BotCity website.
bot.browse("https://www.botcity.dev")

# Wait 3 seconds before closing
bot.wait(3000)

# Finish and clean up the Web Browser
bot.stop_browser()

if name == ‘main’:
main()

– But VSCode is returning an erro message:

Exception has occurred: ValueError
Timeout value connect was <object object at 0x000002B7FB198520>, but it must be an int, float or None.
TypeError: float() argument must be a string or a real number, not ‘object’

During handling of the above exception, another exception occurred:

File “C:\RPA\botcity\ribeiraoPretoBot\webBotTest.py”, line 15, in main
bot.browse(“https://www.botcity.dev”)
File “C:\RPA\botcity\ribeiraoPretoBot\webBotTest.py”, line 25, in
main()
ValueError: Timeout value connect was <object object at 0x000002B7FB198520>, but it must be an int, float or None.

I really do not know how to fix it, because libraries were intalled from pip install…

Would anyone have any tips?

Tks in advance!

:slight_smile:

Hi @Markuz, there may be a conflict between the Selenium and BotCity Framework versions.

Do the following, create a virtual environment to isolate this execution and install the BotCity web framework with the following command:

pip install botcity-framework-web

See if the error stops occurring when running the robot in an isolated virtual environment.

Thanks a lot livia-macom, it works. :slight_smile:

Don’t ask me why, but my codes , out of virtual environment, started running w/o errors…

Have a great day!

Markuz