Skip to content

Troubleshooting

ModuleNotFoundError: No module named teamwire_api

Bot code can't find the SDK files.

Ensure that you have installed the Teamwire SDK package matching your Python environment. See the download section for additional details.

RuntimeError: TW_API_APPID variable is not set

AppID has not been set for this bot.

RuntimeError: Cannot connect to the backend: 403

The TW_API_APPID and TW_API_SECRET pair is invalid.

RuntimeError: Cannot connect to the backend: 400

TW_API_APPID is not valid.

Windows: UnicodeEncodeError: 'charmap' codec can't encode characters in position 5-13: character maps to

This kind of error can happen when printing data containing Unicode characters in a Windows environment. To solve it, you can try changing the console encoding with the command:

> chcp 65001

Linux: UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f609' in position 371: ordinal not in range(128)

In Linux environments, you can fix Unicode encoding issues by properly setting the following environment variable:

$ export PYTHONIOENCODING=utf-8