Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amocrm.v2.exceptions.AmoApiException: Connection aborted. #107

Open
Vladik288 opened this issue Nov 8, 2023 · 5 comments
Open

amocrm.v2.exceptions.AmoApiException: Connection aborted. #107

Vladik288 opened this issue Nov 8, 2023 · 5 comments

Comments

@Vladik288
Copy link

Добрый день, возникает такая ошибка Traceback (most recent call last):
File "/home/app/bot/handlers/echo.py", line 91, in mailing_func
for i in leads:
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/manager.py", line 27, in filter
for data in self._interaction.get_all(*args, include=self._model._get_embedded_fields(), **kwargs):
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 112, in get_all
for data in self._all(self._get_path(), include=include, query=query, filters=filters, order=order):
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 77, in _all
response, _ = self._list(
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 72, in _list
return self.request("get", path, params=params, include=include)
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 57, in request
return self._request(method, path, data=data, params=params, headers=headers)
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 40, in _request
raise exceptions.AmoApiException(e.args[0].args[0]) # Sometimes Connection aborted.
amocrm.v2.exceptions.AmoApiException: Connection aborted.
Перезапуская сервер и все работает, а также токен не хранится больше 2 дней, почему? приходится обновлять, запросы каждый день на сервер идут, в чем может быть причина?

@Vladik288
Copy link
Author

ERROR | bot_logger | 2023-11-08 18:21:05,375 | loader.py | wrapped | 51 | В работе бота возникло исключение
Traceback (most recent call last):
File "/home/app/bot/loader.py", line 47, in wrapped
return await func(message)
File "/home/app/bot/handlers/start.py", line 61, in accept_handler
lead.save()
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/model.py", line 49, in save
self.update()
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/model.py", line 63, in update
self._manager.update(self.id, self._get_updated_data())
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/manager.py", line 19, in update
return self._interaction.update(object_id=object_id, data=data or kwargs)
File "/usr/local/lib/python3.10/site-packages/amocrm/v2/interaction.py", line 132, in update
raise exceptions.ValidationError(response)
amocrm.v2.exceptions.ValidationError: {'validation-errors': [{'request_id': '0', 'errors': [{'code': 'NotSupportedChoice', 'path': 'responsible_user_id', 'detail': 'The value you selected is not a valid choice.'}]}], 'title': 'Bad Request', 'type': 'https://httpstatus.es/400', 'status': 400, 'detail': 'Request validation failed'}
И вот эта еще откуда-то...

@Krukov
Copy link
Owner

Krukov commented Nov 8, 2023

приложение в докере работает ?

второе без кода тяжело понять что не так - ну судя по ошибке вы что то не то в responsible_user_id указываете

@Vladik288
Copy link
Author

Да в докере, там просто сохраяю сделку по-другому статусу, 3 дня работало и перестало.
Удобно будет в tg bbizon?

@Vladik288
Copy link
Author

image

@Vladik288
Copy link
Author

Vladik288 commented Nov 9, 2023

Пока что 1 вопрос волнует, со 2 разобрался вроде. Почему он обрвывает кконект?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants