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
/Users/nmidalgodias/Library/Caches/pypoetry/virtualenvs/sandbox-WXRoqCNu-py3.12/bin/python /Users/nmidalgodias/git/sandbox/src/make_targets/experimental/tinkoff_repro.py
Traceback (most recent call last):
File "/Users/nmidalgodias/git/sandbox/src/make_targets/experimental/tinkoff_repro.py", line 27, in<module>main()
File "/Users/nmidalgodias/git/sandbox/src/make_targets/experimental/tinkoff_repro.py", line 20, in main
order_id = client.orders.replace_order(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nmidalgodias/Library/Caches/pypoetry/virtualenvs/sandbox-WXRoqCNu-py3.12/lib/python3.12/site-packages/tinkoff/invest/_errors.py", line 23, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/nmidalgodias/Library/Caches/pypoetry/virtualenvs/sandbox-WXRoqCNu-py3.12/lib/python3.12/site-packages/tinkoff/invest/services.py", line 1401, in replace_order
request=_grpc_helpers.dataclass_to_protobuff(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nmidalgodias/Library/Caches/pypoetry/virtualenvs/sandbox-WXRoqCNu-py3.12/lib/python3.12/site-packages/tinkoff/invest/_grpc_helpers.py", line 404, in dataclass_to_protobuff
_update_field(first_arg, protobuff_obj, field_name, field_value)
File "/Users/nmidalgodias/Library/Caches/pypoetry/virtualenvs/sandbox-WXRoqCNu-py3.12/lib/python3.12/site-packages/tinkoff/invest/_grpc_helpers.py", line 430, in _update_field
setattr(protobuff_obj, field_name, field_value.value)
^^^^^^^^^^^^^^^^^
AttributeError: 'Field' object has no attribute 'value'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
Что случилось?
Пропущен декоратор
@dataclass
в классе ReplaceOrderRequestinvest-python/tinkoff/invest/schemas.py
Line 2213 in 5836ddc
Из за этого, вызов
client.orders.replace_order(request)
падает с исключениемЕсли добавить
@dataclass
в исходниках вschemas.py
, исключения нет, вызов API срабатывает штатно.Воспроизведение
Workaround
Заполнить необязательное поле
Tinkoff Invest Version
0.2.0-beta98
Python Version
3.12
OS
MacOS
Логи
The text was updated successfully, but these errors were encountered: