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

pytr portfolio gets stuck while unsubscribeing #61

Closed LucEast closed 3 days ago

LucEast commented 3 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 3 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 2 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 2 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 1 month ago

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