knrd1 / bard

Bard IRC Bot
https://github.com/knrd1/bard
MIT License
3 stars 3 forks source link

Error: 'NoneType' object is not subscriptable #1

Closed charls-a closed 11 months ago

charls-a commented 12 months ago

I'm trying to run the bot, but after it connects to IRC and ask a question, it shows this error message in console:

Error: 'NoneType' object is not subscriptable

and on IRC:

<@Bard> BARD PANIC! Check console for error message.

How can this be fixed it?

knrd1 commented 12 months ago

Please check that you setup cookies correctly, for example my config is:

[cookies]
__Secure-1PSIDTS =
__Secure-1PSID = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx

I have no 1PSIDTS in my browser so I leave it empty. I have 1PSID only in the browser.

If you have both, you need to specify both. If you have one, you need to leave the 1PSIDTS empty.

charls-a commented 12 months ago

I already specified them again, correctly, but the error message continues to appear, I even tried with another Google account to see if that could possibly be the case but it remains the same

charls-a commented 12 months ago

Solved... i have to install bardapi version 0.1.30 to make it works

knrd1 commented 11 months ago

Glad to hear you have resolved this! Out of curiosity, what operating system and python version you use? I've been testing this bot on multiple different machines and never had this problem.

charls-a commented 11 months ago

OS: Ubuntu 20.04.6 LTS Python: 2.7.18

knrd1 commented 11 months ago

Thanks for your prompt reply, that makes sense now. The bot was written and tested with Python 3. All major OS distros come with Python 3 by default. Ubuntu 20.04 has Python 3.8.2 as the default version. It looks like you're running a custom, non-default Ubuntu 20 installation with Python 2. That's causing issues here. Thanks for reporting!

knrd1 commented 11 months ago

Closing. This is not going to be investigated. Python 2 is no longer supported, all Python 2 versions have reached end-of-life.