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

I am getting an error when running the following commands. Maybe I'm not installing it correctly. I have Python 3.12.1 #100

Closed titet11 closed 1 week ago

titet11 commented 5 months ago

git clone https://github.com/snowby666/poe-api-wrapper.git cd poe-api-wrapper pip install -U poe-api-wrapper[proxy]

python -m pip install -e .[tests]

tox

(please enter the Tokent)

XXXXXXX: However, after entering my personal touch, I receive the following errors:

test_cancel_message (main.PoeApiTest.test_cancel_message) ... ERROR test_clear_conversation (main.PoeApiTest.test_clear_conversation) ... ERROR test_create_bot (main.PoeApiTest.test_create_bot) ... ERROR test_delete_bot (main.PoeApiTest.test_delete_bot) ... ERROR test_edit_bot (main.PoeApiTest.test_edit_bot) ... ERROR test_edit_knowledge (main.PoeApiTest.test_edit_knowledge) ... ERROR test_explore (main.PoeApiTest.test_explore) ... ERROR test_get_available_bots (main.PoeApiTest.test_get_available_bots) ... ERROR test_get_available_categories (main.PoeApiTest.test_get_available_categories) ... ERROR test_get_available_knowledge (main.PoeApiTest.test_get_available_knowledge) ... ERROR test_get_chat_history (main.PoeApiTest.test_get_chat_history) ... ERROR test_get_previous_messages (main.PoeApiTest.test_get_previous_messages) ... ERROR test_get_subscription_info (main.PoeApiTest.test_get_subscription_info) ... ERROR test_get_threadData (main.PoeApiTest.test_get_threadData) ... ERROR test_get_user_bots (main.PoeApiTest.test_get_user_bots) ... ERROR test_purge_conversation (main.PoeApiTest.test_purge_conversation) ... ERROR test_retry_message (main.PoeApiTest.test_retry_message) ... ERROR test_send_message (main.PoeApiTest.test_send_message) ... ERROR test_shareCode (main.PoeApiTest.test_shareCode) ... ERROR test_upload_file (main.PoeApiTest.test_upload_file) ... ERROR test_upload_knowledge (main.PoeApiTest.test_upload_knowledge) ... ERROR

====================================================================== ERROR: test_cancel_message (main.PoeApiTest.test_cancel_message)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 65, in test_cancel_message client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_clear_conversation (main.PoeApiTest.test_clear_conversation)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 81, in test_clear_conversation client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_create_bot (main.PoeApiTest.test_create_bot)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 132, in test_create_bot client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_delete_bot (main.PoeApiTest.test_delete_bot)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 151, in test_delete_bot client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_edit_bot (main.PoeApiTest.test_edit_bot)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 155, in test_edit_bot client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_edit_knowledge (main.PoeApiTest.test_edit_knowledge)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 117, in test_edit_knowledge client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_explore (main.PoeApiTest.test_explore)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 38, in test_explore client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_available_bots (main.PoeApiTest.test_get_available_bots)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 26, in test_get_available_bots client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_available_categories (main.PoeApiTest.test_get_available_categories)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 30, in test_get_available_categories client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_available_knowledge (main.PoeApiTest.test_get_available_knowledge)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 147, in test_get_available_knowledge client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_chat_history (main.PoeApiTest.test_get_chat_history)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 45, in test_get_chat_history client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_previous_messages (main.PoeApiTest.test_get_previous_messages)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 91, in test_get_previous_messages client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_subscription_info (main.PoeApiTest.test_get_subscription_info)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 21, in test_get_subscription_info client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_threadData (main.PoeApiTest.test_get_threadData)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 61, in test_get_threadData client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_get_user_bots (main.PoeApiTest.test_get_user_bots)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 34, in test_get_user_bots client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_purge_conversation (main.PoeApiTest.test_purge_conversation)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 86, in test_purge_conversation client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_retry_message (main.PoeApiTest.test_retry_message)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 73, in test_retry_message client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_send_message (main.PoeApiTest.test_send_message)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 49, in test_send_message client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_shareCode (main.PoeApiTest.test_shareCode)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 172, in test_shareCode client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_upload_file (main.PoeApiTest.test_upload_file)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 54, in test_upload_file client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

====================================================================== ERROR: test_upload_knowledge (main.PoeApiTest.test_upload_knowledge)

Traceback (most recent call last): File "C:\Users-\poe-api-wrapper\test.py", line 96, in test_upload_knowledge client = PoeApi(cookie=TOKEN) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 159, in init self.connect_ws() Initializing tests File "C:\Users-\poe-api-wrapper\poe_api_wrapper\api.py", line 282, in connect_ws raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.


Ran 21 tests in 65.471s

FAILED (errors=21) py312: exit 1 (88.17 seconds) C:\Users-\poe-api-wrapper> python test.py pid=6228 .pkg: _exit> python C:\Python312\Lib\site-packages\pyproject_api_backend.py True setuptools.build_meta legacy py37: SKIP (0.02 seconds) py38: SKIP (0.02 seconds) py39: SKIP (0.01 seconds) py310: SKIP (0.00 seconds) py311: SKIP (0.03 seconds) py312: FAIL code 1 (94.08=setup[5.91]+cmd[88.17] seconds) evaluation failed :( (94.27 seconds)

C:\Users-\poe-api-wrapper>

waito3209 commented 5 months ago

just install it and try in python , with docker ubantau

anyio==4.2.0 certifi==2023.11.17 charset-normalizer==3.3.2 exceptiongroup==1.2.0 h11==0.14.0 httpcore==1.0.2 httpx==0.26.0 idna==3.6 loguru==0.7.2 poe-api-wrapper==1.3.6 requests==2.31.0 requests-toolbelt==1.0.0 sniffio==1.3.0 typing_extensions==4.9.0 urllib3==2.1.0 websocket-client==1.7.0 (python 3.10)

with the example of from poe_api_wrapper import PoeApi client = PoeApi(cookie=p_e_token) print(client.get_chat_history()['data']) where using token of p-b , m-b also show similar result RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.

titet11 commented 5 months ago

@waito3209

I'm using Windows and I honestly didn't understand anything about the message you wrote me. Could you explain to me how to solve this problem?

waito3209 commented 5 months ago

The message I told is that I face the exact same issues in Ubuntu, so you are not alone

titet11 commented 5 months ago

@waito3209

Oh. This is really disappointing, practically an unusable project.

Alternatively, do you know of any projects that work for this?

waito3209 commented 5 months ago

I tried it one month before and this project is work, so it seems api update or something ( Or you try selenium headless to do the work?)

titet11 commented 5 months ago

@waito3209 How could I use Selenium for this project?

titet11 commented 5 months ago

@waito3209 Will you have the previous version of this project that worked for you?

waito3209 commented 5 months ago

No, this project is a wrapper, if the api in poe.com change, even I have the old version of my projects, it won't work.

Or you write the code in selenium from scratch, it will be a hard task.

titet11 commented 5 months ago

@waito3209

Could you create an .exe executable that does the same thing as your project to make things easier?

waito3209 commented 5 months ago

First, I have not yet done the selenium version, second, even I have , It not possible to do in .exe , if you are in windows, why don't you use the website directly??

waito3209 commented 5 months ago

@titet11 due to some personl need, i make a small project , which typically work on my PC only. you need to slightly modify base on your pc setting https://github.com/waito3209/poe_selenium_shell/tree/main i am not a profession in here .

snowby666 commented 1 week ago

Closing since this is resolved in v1.5.x +