Forums

Webex Chat Bot

I’m trying to host a WebEx chat bot but Pythonanywhere does not like the bot.run() command; I guess because it is similar to app.run(). Is there a way to get the Webex bot to run on pythonanywhere?

Sample Code:

import os

from webex_bot.commands.echo import EchoCommand
from webex_bot.webex_bot import WebexBot


bot = WebexBot(teams_bot_token=os.getenv("WEBEX_TEAMS_ACCESS_TOKEN"),
               approved_rooms=['06586d8d-6aad-4201-9a69-0bf9eeb5766e'],
               bot_name="My Teams Ops Bot",
               include_demo_commands=True)

bot.add_command(EchoCommand())

bot.run()

[edit by admin: formatting]

I don't know that package specifically, but if I'm reading the docs correctly, it's something that is designed to run on a command line and interact directly with WebEx (as opposed to running as a website). Is that correct?

If so, could you give an example of the errors that you get when you run it from a console?