Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web session remains open - working with multiple accounts not possible #20

Closed
britiscurious opened this issue Jan 22, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@britiscurious
Copy link

Description of the bug
I'm trying to download documents from two different Trade Republic accounts.
But the web session for the first account remains active and it is not possible to retrieve documents from the second account afterwards.

To Reproduce

Steps to reproduce the behavior:

  1. run pytr dl_docs --last_days 180 .
  2. Enter the TradeRepbulic phone number for the first account.
  3. Enter the TradeRepbulic pin for the first account.
  4. Do not save credentials.

Log confirms:

hh:mm:ss Credentials not saved

Documents for the first account are downloaded properly.

  1. run pytr dl_docs --last_days 180 . again
  2. Enter the TradeRepbulic phone number for the second account.
  3. Enter the TradeRepbulic pin for the second account.
  4. Do NOT save credentials.

Log says:

hh:mm:ss Credentials not saved
hh:mm:ss Web session resumed
hh:mm:ss Logged in

The log give the impression, that the login to the second account was successful. But actually you get or remain logged in into the first account. So documents from the second account are not downloaded. Instead documents from the first account are downloaded again.

Expected behavior
An existing web session gets closed, when pytr gets called with different credentials.
Login into the second Trade Republic account actually happens and documents from the second Trade Republic account are downloaded.

Error log
n.a.

Environment

  • OS: MacOS 12.1
  • pytr version: 0.0.18

Additional context
n.a.

@britiscurious britiscurious added the bug Something isn't working label Jan 22, 2022
@britiscurious
Copy link
Author

Workaround:

Remove ~/.pytr/cookies.txt after documents from the first account have been downloaded.

@marzzzello
Copy link
Collaborator

marzzzello commented Jan 23, 2022

Mh yeah, the cookies shouldn't be saved in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants