sugaroidbot / sugaroid

The not-that intelligent, but cute Artificially Intelligent bot, created when I was bored.
https://g.sugaroid.srev.in/
MIT License
15 stars 8 forks source link

[+orion] Bug 'akinator' #108

Closed orion-botx closed 3 years ago

orion-botx commented 3 years ago
The following answer was a given by sugaroid, and is considered as a bug. Please 
manually review this issue, and close it if it looks unnecessary.

user: akinator 
sugaroid: An unhandled exception occurred: Traceback (most recent call last):

File "telegram_bot.py", line 162, in on_message response = str(sg.parse(msg)) File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/sugaroid.py", line 254, in parse response = self.neuron.parse(args) File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/brain/brain.py", line 76, in parse response = self.gen_best_match(preprocessed) File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/brain/brain.py", line 101, in gen_best_match return self.bot.get_response(parsed) File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/core/bot.py", line 361, in get_response response = self.generate_response( File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/core/bot.py", line 148, in generate_response output = adapter.process( File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/brain/aki.py", line 173, in process self.chatbot.globals["akinator"]["class"] = SugaroidAkinator(self.chatbot) File "/app/.heroku/python/lib/python3.8/site-packages/sugaroid/brain/aki.py", line 68, in init self.game_instance = self.aki.start_game("en") File "/app/.heroku/python/lib/python3.8/site-packages/akinator/akinator.py", line 153, in start_game region_info = self._auto_get_region(get_lang_and_theme(language)["lang"], get_lang_and_theme(language)["theme"]) File "/app/.heroku/python/lib/python3.8/site-packages/akinator/akinator.py", line 114, in _auto_get_region return {"uri": uri, "server": next((i for i in parsed if i["subject_id"] == "1"), None)["urlWs"]} TypeError: 'NoneType' object is not subscriptable

sreyasaju commented 3 years ago

@srevinsaju, It seems like this issue can be closed, I've tested the same in sugaroid-discord and locally on my device and it works perfectly fine..

( ဖ‿ဖ) @> akinator
sugaroid: Lets start the play of Akinator™ with me. I, Sugaroid, am your host genie 🔮 for your competition
How to Play:
+ think of a character, real or fictional, keep it well in mind
+ answer the questions as truthfully as possible
+ Sugaroid genie will try to guess your person out
+ Best of luck; have fun!
Here is your first question
Does your character really exist?<sugaroid:yesno>