Skip to content
Sign upLog in
← Back to Community

Gran

Profile icon
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
Profile icon
AndreiMotitz
Comments
hotnewtop
Profile icon
Geocube101

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

if "encouragements" in db.keys(): options += list(db["encouragements"])
Profile icon
AndreiMotitz

@Geocube101
Thx alot , im new =)