snowby666 / poe-api-wrapper

👾 A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! 🚀
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
687 stars 82 forks source link

TypeError: 'NoneType' object is not subscriptable after the chatbot response #108

Closed ben9812 closed 4 months ago

ben9812 commented 4 months ago

You : hello

mybot : Hello! I am a chatbot.Exception in thread Thread-3 (get_suggestions): Traceback (most recent call last): File "C:\Users\Ben\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1052, in _bootstrap_inner self.run() File "C:\Users\Ben\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 989, in run self._target(*self._args, **self._kwargs) File "C:\Users\Ben\AppData\Local\Programs\Python\Python312\Lib\site-packages\poe_api_wrapper\api.py", line 877, in get_suggestions edges = response_json['data']['chatOfCode']['messagesConnection']['edges']


TypeError: 'NoneType' object is not subscriptable
snowby666 commented 4 months ago

Can you please specify your OS, Python version and Library version so it will be easier to debug. Thanks

ben9812 commented 4 months ago

Can you please specify your OS, Python version and Library version so it will be easier to debug. Thanks

My OS is Windows 11, Python version is 3.12.0 and the Library version is 1.3.6. Thank you

snowby666 commented 4 months ago

can you try updating the lib to v1.3.7:

pip install -U poe_api_wrapper
theblackrussian commented 4 months ago

I had the same issue and it got sorted after updating the package. @snowby666 thank you for your assistance and for sharing all this, it has saved me a ton of hours !