samirsalman / AmazonOffers-TelegramBot

This project is a Telegram Bot connected to a Telegram Channel that checks Amazon offers and send them to your Channel.
140 stars 48 forks source link

Error while running the bot #1

Closed AlejandroDieg0 closed 3 years ago

AlejandroDieg0 commented 3 years ago

Hi, when start running the bot it says.


Error calling PA-API 5.0!
Status code: 429
Errors : {"__type":"com.amazon.paapi5#TooManyRequestsException","Errors":[{"Code":"TooManyRequests","Message":"The request was denied due to request throttling. Please verify the number of requests made per second to the Amazon Product Advertising API."}]}

How can I solve? thank you for your work

samirsalman commented 3 years ago

Hi,

the error is caused by amazon API. You have spent your paapi(Amazon API) daily request or you make more than 1 request per second, look at your PAUSE_MINUTE in the code.

You can find errors documentation at this page: https://webservices.amazon.com/paapi5/documentation/troubleshooting/error-messages.html

For your error the documentation says: "If the requests at which Product Advertising API 5.0 is being hit is too high, it will result in this exception."

image

I hope you can solve the problem, if you not solve please write me.

Thank you for your issue and your star.

AlejandroDieg0 commented 3 years ago

Thank you for the response, it happened just when started the bot, so I dont think I spent my paapi daily request. my pause_minute is 12 as by default, what value would help to get the bot workin'? thank you again

samirsalman commented 3 years ago

You can try to change row 49 in bot.py:

From time.sleep(1) to time.sleep(3)

Tell me if this solve your problem.

AlejandroDieg0 commented 3 years ago

You can try to change row 49 in bot.py:

From time.sleep(1) to time.sleep(3)

Tell me if this solve your problem.

not solved, on every request it says the same error. I'll wait until tomorrow to avoid thinking about problem to my Api key.