Problem :
When I try to run the below code:
j=0
while j<5:
j=j+1;
try:
MySellSta=client.get_order(symbol=MySymb,orderId=MySellOrderNum,recvWindow=MyDelay)
except client.get_order as mye:
print ("This is the error message!{}".format(j))
#End while
I got the following error: TypeError: catching classes that do not inherit from BaseException is not allowed
I kind of fix it with the below code:
j=0
while j<5:
j=j+1;
try:
MySellSta=client.get_order(symbol=MySymb,orderId=MySellOrderNum,recvWindow=MDelay)
except:
print ("This is the error message!{}".format(i))
#End while
The result is that it ignores my error and go to my next while but I want to catch my error and print my error.