Ask coding questions

← Back to all posts
Gran
AndreiMotitz

I have an error but i dont know how to resolve this

If anyone can help me with this ?

Ignoring exception in on_message
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 64, in on_message
options = options + db["encouragements"]

TypeError: can only concatenate list (not "ObservedList") to list

Answered by Geocube101 [earned 5 cycles]
View Answer
Voters
AndreiMotitz
Comments
hotnewtop
Geocube101

Python is saying that you can only add two objects of type 'list'. Try converting db["encouragements"] to a list:

AndreiMotitz

@Geocube101 Thx alot , im new =)