Closed Maksim787 closed 2 years ago
Убрать await в строчке https://github.com/Tinkoff/invest-python/blob/26ef8cc1e70d144707246e64f29466b4491d4f8c/tinkoff/invest/async_services.py#L598
instruments.get_favorites() выдает ошибку TypeError: object GetFavoritesResponse can't be used in 'await' expression
instruments.get_favorites()
TypeError: object GetFavoritesResponse can't be used in 'await' expression
Корутина ожидается дважды:
@handle_aio_request_error("GetFavorites") async def get_favorites( self, ) -> GetFavoritesResponse: request = GetFavoritesRequest() response_coro = await self.stub.GetFavorites( request=_grpc_helpers.dataclass_to_protobuff( request, instruments_pb2.GetFavoritesRequest() ), metadata=self.metadata, ) response = await response_coro log_request(await get_tracking_id_from_coro(response_coro), "GetFavorites") return _grpc_helpers.protobuf_to_dataclass(response, GetFavoritesResponse)
No response
0.2.0-beta30
3.10
Windows
Fixed in https://github.com/Tinkoff/invest-python/pull/88
Что случилось?
Убрать await в строчке https://github.com/Tinkoff/invest-python/blob/26ef8cc1e70d144707246e64f29466b4491d4f8c/tinkoff/invest/async_services.py#L598
instruments.get_favorites()
выдает ошибкуTypeError: object GetFavoritesResponse can't be used in 'await' expression
Корутина ожидается дважды:
Воспроизведение
No response
Tinkoff Invest Version
0.2.0-beta30
Python Version
3.10
OS
Windows
Логи
No response