pytr-org / pytr

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

pytr dl_docs --last_days 7 docs does not DL PDF, although they are there (checked online with TR) #47

Closed fft1010 closed 7 months ago

fft1010 commented 10 months ago

Description of the bug Hi, there is an issue with the last_days switch in Version 0.1.9

This is my commandline pytr dl_docs --last_days 7 docs

which connects well, and than shows:

10:21:16 1/4: Verkauf Short @15974.51 Pt. DAX® Open End Turbo -- Fr. 17.11. um 21:51 Uhr (Europe/Berlin)
10:21:16 2/4: Kauf Short @15974.51 Pt. DAX® Open End Turbo -- Fr. 17.11. um 17:05 Uhr (Europe/Berlin)
10:21:16 3/4: Verkauf Short @15974.51 Pt. DAX® Open End Turbo -- Fr. 17.11. um 21:50 Uhr (Europe/Berlin)
10:21:16 4/4: Verkauf Short @15974.51 Pt. DAX® Open End Turbo -- Fr. 17.11. um 21:52 Uhr (Europe/Berlin)
10:21:16 Received all details
10:21:16 Write deposit entries
10:21:16 Deposit creation finished!
10:21:16 Nothing to download

Which are very old PDF dates dates, as today is the 27.11.2023 (and they are definitely not in the timeframe of 7 days) I double checked online. The documents I was hoping to download where already produced by TR.

Without the "--last_days" command, the files are downloaded. (30 seconds later)

pytr dl_docs docs

10:21:44 384/390: Kauf Long @15887.30 Pt. DAX® Open End Turbo -- Mo. 27.11. um 09:00 Uhr (Europe/Berlin)
10:21:44 385/390: Kauf Long @116.89 € Airbus Open End Turbo -- Fr. 24.11. um 20:15 Uhr (Europe/Berlin)
10:21:44 386/390: Verkauf Long @128.48 € SAP Open End Turbo -- Mo. 27.11. um 09:38 Uhr (Europe/Berlin)
10:21:44 387/390: Verkauf Long @15887.30 Pt. DAX® Open End Turbo -- Mo. 27.11. um 09:10 Uhr (Europe/Berlin)
10:21:44 388/390: Verkauf Long @15887.30 Pt. DAX® Open End Turbo -- Mo. 27.11. um 09:16 Uhr (Europe/Berlin)
10:21:44 389/390: Verkauf Long @15887.30 Pt. DAX® Open End Turbo -- Mo. 27.11. um 09:07 Uhr (Europe/Berlin)
10:21:44 390/390: Verkauf Long @15887.30 Pt. DAX® Open End Turbo -- Mo. 27.11. um 09:04 Uhr (Europe/Berlin)
10:21:44 Received all details
10:21:44 Write deposit entries
10:21:44 Deposit creation finished!
10:21:44 Waiting for downloads to complete..
10:21:45 Done.

To Reproduce ...

Expected behavior

Error log

No errors.

Environment

Additional context As you see, I trade a lot any maybe this is the issue in this case. Again: Great program, I love it, and it works for me perfect, without the --last_days 7

rinkmi1 commented 9 months ago

seems to be a duplicate of this

fft1010 commented 7 months ago

I now have version 0.1.9 and it seems to work. I do have a wrapper around pytr, getting all files the first start on a day, and using

pytr dl_docs --last_days $days docs

for all next starts on a day. days=16 at the moment.

I do not know if this is really necessary, but it is hard to debug, as sometime TR does not deliver the PDF fast enough. Anyway: I'll keep an eye on it and re-open a new ticket, if the problem still exists for me.

thank you Juergen