eren23 / naive_bayes_discord_bot

0 stars 3 forks source link

"TypeError: 'NoneType' object is not iterable" in main.py #1

Open Actograv opened 1 year ago

Actograv commented 1 year ago

while trying to get the discord bot to respond i keep running into a TypeError on line: sentiment = classifier.classify(dict([token, True]for token in custom_tokens)) since i only started with Python 3 days ago i have no clue what to do about this other than stare at the screen

eren23 commented 1 year ago

while trying to get the discord bot to respond i keep running into a TypeError on line: sentiment = classifier.classify(dict([token, True]for token in custom_tokens)) since i only started with Python 3 days ago i have no clue what to do about this other than stare at the screen

Wow man this is one old ass repo of mine, I'll try to remember what exactly have I done here, until then can you share the exact error you get when you run it so I can try to help you with that?

Aaaand goodluck with your Python journey :)

Actograv commented 1 year ago

while trying to get the discord bot to respond i keep running into a TypeError on line: sentiment = classifier.classify(dict([token, True]for token in custom_tokens)) since i only started with Python 3 days ago i have no clue what to do about this other than stare at the screen

Wow man this is one old ass repo of mine, I'll try to remember what exactly have I done here, until then can you share the exact error you get when you run it so I can try to help you with that?

Aaaand goodluck with your Python journey :)

Traceback (most recent call last): File "E:**********\venv\Lib\site-packages\discord\client.py", line 441, in _run_event await coro(*args, kwargs) File "E:************\main.py", line 82, in on_message sentiment = classifier.classify(dict([token, True] for token in custom_tokens)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable