You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the bug
Why is it optional to save credentials when pytr crashes as soon as you refuse to save?
To Reproduce
Steps to reproduce the behavior:
Run pytr login
Refuse to save the credentials
See error
Expected behavior
Would be great if the program works without me saving the credentials
Error log
C:\Users\Virtual>pytr login
13:07:02 Credentials file not found
Please enter your TradeRepbulic phone number in the format +4912345678:
+4912345678
Please enter your TradeRepbulic pin:
0000
Save credentials? Type "y" to save credentials:
n
13:07:24 Credentials not saved
Traceback (most recent call last):
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\site-packages\pytr\api.py", line 89, in __init__
with open(CREDENTIALS_FILE, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Virtual\\.pytr\\credentials'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Virtual\AppData\Local\Programs\Python\Python38-32\Scripts\pytr.exe\__main__.py", line 7, in <module>
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\site-packages\pytr\main.py", line 143, in main
login(phone_no=args.phone_no, pin=args.pin, web=weblogin)
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\site-packages\pytr\account.py", line 61, in login
tr = TradeRepublicApi()
File "c:\users\virtual\appdata\local\programs\python\python38-32\lib\site-packages\pytr\api.py", line 94, in __init__
raise ValueError(f'phone_no and pin must be specified explicitly or via {CREDENTIALS_FILE}')
ValueError: phone_no and pin must be specified explicitly or via C:\Users\Virtual\.pytr\credentials
Environment
OS: Windows
Version: pytr-0.0.9
The text was updated successfully, but these errors were encountered:
Description of the bug
Why is it optional to save credentials when pytr crashes as soon as you refuse to save?
To Reproduce
Steps to reproduce the behavior:
pytr login
Expected behavior
Would be great if the program works without me saving the credentials
Error log
Environment
The text was updated successfully, but these errors were encountered: