Topics

Forum Topics not found

Replies

sacha.berthelon
28 Dec 2024, 09:43 ( Updated at: 30 Dec 2024, 07:15 )

RE: Twisted-timeout in OpenApiPy

amusleh said: 

Hi,

This error occurs when your deferred is timed out, if the client doesn't receive a response for your request in 5 seconds (you can change it by passing responseTimeoutInSeconds to Send method) the returned deferred will be timed out.

The cause of this issue can be invalid request, and you have to check for incoming error message after your request by listening to error message types, there are several error messages that server can return, please check the Open API documentation.

I do have the exact same issue, 

I try to get info about the account positions and the account infos each second, and it work perfectly but after let's say 1 minute or so I begin to experience the same issue, 

Having an error for almost every call making it impossible to track effectively my differents accounts. 

Do you know why ? Is this because of the  the limits ? But I saw that I had the right to do 50 non historical requests and I am only performing 4 of them each seconds. Or maybe this is because I am in sandbox ? 

full error : 

Message Error [2] :  [Failure instance: Traceback: <class 'twisted.internet.defer.TimeoutError'>: (5, 'Deferred')
C:\Users\sacha\AppData\Local\Programs\Python\Python311\Lib\site-packages\twisted\internet\defer.py:1088:_runCallbacks
C:\Users\sacha\AppData\Local\Programs\Python\Python311\Lib\site-packages\twisted\internet\defer.py:820:convertCancelled
C:\Users\sacha\AppData\Local\Programs\Python\Python311\Lib\site-packages\twisted\internet\defer.py:297:_cancelledToTimedOutError
]

 

I can put my full code if asked but here is the main part**

 

I hope someone already did encounter something like that and know why is this happenning, 

Best regards,

Sacha


@sacha.berthelon