I have 2FA enabled so I used your example to connect to degiro. However I get the following error using python 3.6.13:
DEBUG:trading.models.session_storage:session:getter: MainThread
DEBUG:trading.models.session_storage:session:getter: MainThread
Traceback (most recent call last):
File "main.py", line 30, in <module>
trading_api.connect()
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/site-packages/trading/api.py", line 59, in connect
connection_storage.session_id = basic.get_session_id()
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/site-packages/trading/basic.py", line 73, in get_session_id
logger=logger
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/site-packages/trading/utilities.py", line 126, in get_session_id
one_time_password = str(otp.get_totp(totp_secret_key))
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/site-packages/onetimepass/__init__.py", line 169, in get_totp
token_length=token_length,
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/site-packages/onetimepass/__init__.py", line 113, in get_hotp
key = base64.b32decode(secret, casefold=casefold)
File "/Users/user/.asdf/installs/python/3.6.13/lib/python3.6/base64.py", line 205, in b32decode
raise binascii.Error('Incorrect padding')
binascii.Error: Incorrect padding
Hello,
I have 2FA enabled so I used your example to connect to degiro. However I get the following error using python 3.6.13: