You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Я пытался выгрузить все хождения по стадиям через ручку "crm.stagehistory.list" через метод get_all()
мой код: params = {'entityTypeId': 2, 'filter[>=CREATED_TIME]': '2022-04-01'} bitrix.get_all('crm.stagehistory.list', params)['result']['items']
на 2413 из ~120к все падает с ошибкой
AttributeError Traceback (most recent call last)
/tmp/ipykernel_30778/1773639979.py in <module>
1 params = {'entityTypeId': 2, 'filter[>=CREATED_TIME]': '2022-04-01'}
----> 2 bitrix.get_all('crm.stagehistory.list', params)['result']['items']
~/analytics_env/lib/python3.8/site-packages/fast_bitrix24/bitrix.py in get_all(self, method, params)
56 '''
57
---> 58 return self.srh.run(GetAllUserRequest(self, method, params).run())
59
60 def get_by_ID(self, method: str, ID_list: Iterable,
~/analytics_env/lib/python3.8/site-packages/fast_bitrix24/srh.py in run(self, coroutine)
102 loop = asyncio.get_event_loop()
103
--> 104 return loop.run_until_complete(self.run_async(coroutine))
105
106 async def run_async(self, coroutine):
~/analytics_env/lib/python3.8/site-packages/nest_asyncio.py in run_until_complete(self, future)
68 raise RuntimeError(
69 'Event loop stopped before Future completed.')
---> 70 return f.result()
71
72 def _run_once(self):
/usr/lib/python3.8/asyncio/futures.py in result(self)
173 self.__log_traceback = False
174 if self._exception is not None:
--> 175 raise self._exception
176 return self._result
177
/usr/lib/python3.8/asyncio/tasks.py in __step(***failed resolving arguments***)
278 # We use the `send` method directly, because coroutines
279 # don't have `__iter__` and `__next__` methods.
--> 280 result = coro.send(None)
281 else:
282 result = coro.throw(exc)
~/analytics_env/lib/python3.8/site-packages/fast_bitrix24/srh.py in run_async(self, coroutine)
109
110 async with self.handle_sessions():
--> 111 return await coroutine
112
113 @asynccontextmanager
~/analytics_env/lib/python3.8/site-packages/fast_bitrix24/user_request.py in run(self)
108
109 if self.first_response.more_results_expected():
--> 110 await self.make_remaining_requests()
111 self.dedup_results()
112
~/analytics_env/lib/python3.8/site-packages/fast_bitrix24/user_request.py in make_remaining_requests(self)
151 ).run()
152
--> 153 self.results.extend(remaining_results)
154
155 def dedup_results(self):
AttributeError: 'dict' object has no attribute 'extend'
кажется, что по каким-то причинам иногда их API возвращает не массив, а что-то еще (словарь?) и все перестает работать
The text was updated successfully, but these errors were encountered:
Метод crm.stagehistory.list имеет нестандартный формат выдачи результатов и код get_all, который работал для всех других методов, для этого метода не сработал.
В ветке leshchenko1979/issue159 выложил правки -- можете проверить, что у вас с ними все работает?
Я пытался выгрузить все хождения по стадиям через ручку "crm.stagehistory.list" через метод
get_all()
мой код:
params = {'entityTypeId': 2, 'filter[>=CREATED_TIME]': '2022-04-01'} bitrix.get_all('crm.stagehistory.list', params)['result']['items']
на 2413 из ~120к все падает с ошибкой
кажется, что по каким-то причинам иногда их API возвращает не массив, а что-то еще (словарь?) и все перестает работать
The text was updated successfully, but these errors were encountered: