pytr-org / pytr

Use TradeRepublic in terminal and mass download all documents
https://pypi.org/project/pytr/
MIT License
357 stars 59 forks source link

ValueError: Connection Error: failed 31 #51

Closed Maverik5124 closed 5 months ago

Maverik5124 commented 5 months ago

I tried starting the document download today which resulted in the error "ValueError: Connection Error: failed 31". This happened during the step "Connection to websocket" after login was successful.

KiwiiKev commented 5 months ago

image

Had the same issue today

fft1010 commented 5 months ago

Hi, I had this yesterday, but there TR was very slow in the app as well. I think it is a timeout due to TR problems. IMHO TR should get their servers fixed. I „often“ happens, when USA stocks open. As today. I was using the program in the morning german time, I did not have the problem. Did not check this evening.

thanks Juergen

KiwiiKev commented 5 months ago

image

Well, turns out i just did not had the newst release, was still at 0.1.5. Upgraded to 0.1.9 and did not had the error anymore. @fft1010: I tried it with the old release for several times and always got the error quite instant, so i dont know what happend at your end. Are you also on V0.1.9?

fft1010 commented 5 months ago

Again: I am 99,95% sure, that TR had severe server problems on that day. I tried downloading within 20 minute a couple of times, and it timed out a lot. I than did it one hour later, and it worked. So either I had network problems (but as it seems other had this problem as well :and: all other big players where reachable fast from my end), or TR had server problems. As this was happening while US stocks opened, and I assume that more people than trade, I would rather buy the stock, that TR had server problems, than there is a bug in pytr. Except: Maybe there is a nicer way to catch the timeout in a nicer way, than letting the operating system and python do it (and having this "crash"). BUT again: There was a timeout on TR side. Nothing that can be fixed by pytr, only displaying this could be nicer :-)

Other reason why I think it was a TR problem: The Received #1 ... #3 lines usually come within 10 in one second, even more. But when the error came, the lines came ONE LINE every 10 seconds (or worse). So: Network problems somewhere in between my machine and TR.

Other reason why I think it was a TR problem: The APP was slow (still could be my network, but again: All other servers worked like a charm.) The login was "instable",only the brute cashing in the TR APP was showing (old) data. So one could assume, that TR was fine, but it wasn't.

thanks Juergen

Maverik5124 commented 5 months ago

I have just run the update again. It seems that the update to V0.1.9 failed last time. Now with V0.1.9 correctly installed the download works. Thanks for the help!