pytr-org / pytr

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

pytr portfolio gets stuck while unsubscribeing #61

Closed LucEast closed 4 months ago

LucEast commented 7 months ago

Description of the bug When I run pytr -v debug portfolio it gets stuck while unsubscribing ID 13 which has ISIN US67066G1040 (Nvidia) for me.

To Reproduce Steps to reproduce the behavior:

  1. Ran the command pytr -v debug portfolio
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Error log

...
2024-04-02 21:01:33+0200 api       DEBUG    Unsubscribing: 13

Nothing happens after that line. I have to kill it with ctrl+c

Environment

Additional context Add any other context about the problem here.

LucEast commented 7 months ago

It seems like the open connection (subscription) loads lots and lots of data. Therefore the script ends in a deadlock. A possible solution would be to subscribe and directly unsubscribe one item at a time.

CleanShot 2024-04-03 at 22 07 08

CorsiDanilo commented 6 months ago

Description of the bug When I run pytr -v debug portfolio it gets stuck while unsubscribing ID 13 which has ISIN US67066G1040 (Nvidia) for me.

To Reproduce Steps to reproduce the behavior:

  1. Ran the command pytr -v debug portfolio
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Error log

...
2024-04-02 21:01:33+0200 api       DEBUG    Unsubscribing: 13

Nothing happens after that line. I have to kill it with ctrl+c

Environment

  • OS: MacOS
  • pytr version: 0.1.9

Additional context Add any other context about the problem here.

@LucEast Same problem here, currently I cannot download any data :( Did you manage to solve it? Even just the export to json?

cyrilpawelko commented 6 months ago

Seems linked to #48 Tested right now, and it does not unsubscribe only for values not on LSX, which is hardcoded in pytr.

Katzmann1983 commented 6 months ago

65 Should fix this. There are sometimes no information for certain items, e.g. Dividends.