yusuf8ahmed / Wsimple

Wsimple: is a API and Web interface for Wealthsimple Trade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zeros in verification cause login errors

Korpip opened this issue · comments

I have noticed that whenever I get a verification code via email and that code has zeros from the beginning that
ws = Wsimple(email, password, otp_callback=get_otp) File "/usr/local/lib/python3.7/dist-packages/wsimple/api/api.py", line 183, in __init__ raise LoginError wsimple.api.errors.LoginError: A Login Error has occurred

Today I got both these codes and had both fail.
008266 059256

Hi Korpip, I am assuming that you are using the login code that I provided. To fix this issue remove the int function inclosing the input function.

Working login code:

from wsimple.api import Wsimple

def get_otp():
    return input("Enter otpnumber: \n>>>"))

email = str(input("Enter email: \n>>>"))
password = str(input("Enter password: \n>>>"))

ws = Wsimple(email, password, otp_callback=get_otp) 

# check the current operation status of internal Wealthsimple Trade
print(ws.current_status())

That corrected this.