weidengeist / Willowbot

A chat bot intended to be used on Twitch
GNU General Public License v3.0
4 stars 0 forks source link

TypeError: unsupported operand type #9

Closed LeoAlt8 closed 1 year ago

LeoAlt8 commented 1 year ago

Please. Help solve the problem. Installed on a new machine and now the bot does not work.

Traceback (most recent call last): File "main_cli.py", line 14, in <module> CONFIG = getConfig() # Load configuration files. File "/root/Willowbot/modules/basics.py", line 77, in getConfig CONFIG = CONFIG | configFromFile TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

Ubuntu 20.04.5 LTS Python 3.8.10

weidengeist commented 1 year ago

Your installed version of Python 3.8.1 is too old. The error code says that there is an unsupported operand for two variables of type dictionary, namely |. This operation is only supported by Python version 3.9 (see this Python Enhancement Proposal for details) onwards.

The 20.04 Ubuntu release is also quite dated. The most recent Ubuntu LTS release is 22.04, which ships a sufficiently functional version of Python for Willowbot. Alternatively, you may try to update your repository sources or install an up-to-date Python manually.

LeoAlt8 commented 1 year ago

Thank you. Installed Python 3.10. Everything worked. Ubuntu 22.04 will not fit, because: image