ading2210 / poe-api

[UNMAINTAINED] A reverse engineered Python API wrapper for Quora's Poe, which provides free access to ChatGPT, GPT-4, and Claude.
https://pypi.org/project/poe-api
GNU General Public License v3.0
2.5k stars 313 forks source link

AttributeError: 'NoneType' object has no attribute 'group' #202

Open ahmadperformve opened 1 year ago

ahmadperformve commented 1 year ago

I am using Windows 11 and have updated the poe-api module to Version: 0.4.17 but I am getting this error.

Traceback (most recent call last): File "c:\Users\ThinkPad\Desktop\PerformVE\sentiment_analysis_api\Sentiment_Analysis_3\main.py", line 144, in client = poe.Client(token) ^^^^^^^^^^^^^^^^^ File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 152, in init self.connect_ws() File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 405, in connect_ws self.setup_connection() File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 178, in setup_connection self.next_data = self.get_next_data(overwrite_vars=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 226, in get_next_data self.formkey = self.extract_formkey(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 203, in extract_formkey script_text = re.search(script_regex, html).group(1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group'

ak7660 commented 1 year ago

Same issue, is there a way to solve it?

birdup000 commented 1 year ago

same issue here

pzq7025 commented 1 year ago

you can update the package to solve the problem:

pip install -U poe-api

but you will meet a new issues:

RuntimeError: Failed to download https://poe.com too many times.
pzq7025 commented 1 year ago

A very strange phenomenon is that although I encountered this bug after the update, it disappeared after running the program multiple times. I suspect it is related to this issue #issues193.

ahmadperformve commented 1 year ago

you can update the package to solve the problem:

pip install -U poe-api

but you will meet a new issues:

RuntimeError: Failed to download https://poe.com too many times.

I have already updated to the latest version but still face the issue!

ading2210 commented 1 year ago

For now, try specifying the formkey manually.

huyremy commented 1 year ago

For now, try specifying the formkey manually.

ok, chơi luôn. Let's re-begin. Well well well...formkey...ok I can see fk have problem. Maybe inside OpenAI have something change about in founder's position.

362950939_9678849428853625_887480916740366864_n

huyremy commented 1 year ago

For now, try specifying the formkey manually.

It's work Screenshot from 2023-07-27 04-00-29

huyremy commented 1 year ago

For now, try specifying the formkey manually.

ok, chơi luôn. Let's re-begin. Well well well...formkey...ok I can see fk have problem. Maybe inside OpenAI have something change about in founder's position.

362950939_9678849428853625_887480916740366864_n

I can see fk...and...I can see -U in (pip install -U poe-api)...ok...Now listen... Hey...Can you C like me ? I can C FK -U