Código não executa como esperado

This is the code, when I press play in 2021, the code worked just fine, now I don’t know where I went wrong that it didn’t work. Think it’s the Python version? I use Windows 10 and the latest version of Python.


Please make sure you install the bot with pip install -e . in order to get all the dependencies
on your Python environment.

Also, if you are using PyCharm or another IDE, make sure that you use the SAME Python interpreter
as your IDE.

If you get an error like:

ModuleNotFoundError: No module named 'botcity'

This means that you are likely using a different Python interpreter than the one used to install the bot.
To fix this, you can either:

  • Use the same interpreter as your IDE and install your bot with pip install -e .
  • Use the same interpreter as the one used to install the bot (pip install -e .)

Please refer to the documentation for more information at https://documentation.botcity.dev/

from botcity.core import DesktopBot

Uncomment the line below for integrations with BotMaestro

Using the Maestro SDK

from botcity.maestro import *

class Bot(DesktopBot):
def action(self, execution=None):
# Uncomment to silence Maestro errors when disconnected
# if self.maestro:
# self.maestro.RAISE_NOT_CONNECTED = False

    # Fetch the Activity ID from the task:
    # task = self.maestro.get_task(execution.task_id)
    # activity_id = task.activity_id

    # Opens the BotCity website.

    # Uncomment to mark this task as finished on BotMaestro
    # self.maestro.finish_task(
    #     task_id=execution.task_id,
    #     status=AutomationTaskFinishStatus.SUCCESS,
    #     message="Task Finished OK."
    # )

def not_found(self, label):
    print(f"Element not found: {label}")

if name == ‘main’:

Hi @Rafael, could you add here the full error message?

Technically if the process exited with code 0, that means all was correct.
Please note that it printed a message Hi, PyCharm, was this in your code?

If possible, please also add here your code so we can better assist you.