Closed Lolzenrith closed 7 months ago
The first error occurs when lichess-bot first tries to connect to lichess.org:
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://lichess.org/api/token/test
The 502 error indicates something went wrong when connecting to https://lichess.org. Can you access lichess.org through a web browser?
Sorry for not replying for so long. I just noticed that the 502 error only happens in the recent.log file. In the old.log file, the problem is due to the greeting configuration.
greeting:
hello: Hi! I'm {Wanda!}. Good luck! Type !help for a list of commands I can respond
to.
goodbye: Good game!
hello_spectators: Hi! I'm {Wanda!}. Type !help for a list of commands I can respond
to.
goodbye_spectators: Thanks for watching!
First, the exclamation point needs to go outside the curly brackets: {Wanda}!
. Next, instead of "Wanda", the name inside the curly bracket should be me
. This variable will be filled in by the name of your bot's account.
I actually just now came back, so I did what you told me, and I'm probably doing something wrong, but it's still not working.
+++ https://lichess.org/3S0Qe6Fp/black Blitz vs WandaBotPuzzles (1500?) lichess-bot.py:584 (3S0Qe6Fp) INFO Backing off play_game(...) for 30.4s (ValueError: expected ':' after _common.py:105 conversion specifier) old.log recent.log
I think it might have to do with the _common.py file, supposedly on line 105? Not sure though. The greeting wont even show up, and I can indeed access lichess.
According to the logs, the greeting section of your config file doesn't work. Replace the greeting section with this:
greeting:
hello: Hi! I'm {me}! Good luck! Type !help for a list of commands I can respond
to.
goodbye: Good game!
hello_spectators: Hi! I'm {me}! Type !help for a list of commands I can respond
to.
goodbye_spectators: Thanks for watching!
Notice that {Wanda!}
has been replaced by {me}!
with the exclamation point moved outside the curly braces.
Another option: If you want your original message, delete the curly braces entirely.
greeting:
hello: Hi! I'm Wanda! Good luck! Type !help for a list of commands I can respond
to.
goodbye: Good game!
hello_spectators: Hi! I'm Wanda! Type !help for a list of commands I can respond
to.
goodbye_spectators: Thanks for watching!
Are you still having this issue?
Please reopen this issue if you are still having problems.
I have an issue involving something with the "play_game" function, it says something like "+++ (lichess game link) Blitz VS Bot jpg bot (2065) Backing off play_game(...) for 127.5s (ValueError: expected ':' after _common.py:105 conversion specifier) It's a bit vague, can anybody help me get this bot up and running? I followed a tutorial and got the entire bot up, even got it to challenge me, but it never played a move nor did its clock tick a second. I feel like this MAY have to do with the API, but then again I can't program well, so I may be completely wrong. My bot's name is WandaBot, by the way. it's a modded version of a bot (previously existing) that I feel like is modified enough for release. I haven't 100% made the software myself, but I am planning on making more improvements. There isn't much to share which makes this difficult. However, here is the video I watched: https://www.youtube.com/watch?v=oTuZrYCpxNU&pp=ygUZaG93IHRvIG1ha2UgYSBsaWNoZXNzIGJvdA%3D%3D Here are the logs: recent.log old.log