I try to UPDATE cash but I get an error I don’t understand why. Used this syntax in buy and it works fine but now File "/home/ubuntu/workspace/pset7/finance/application.py", line 243, in sell id = session["user_id"], sell = dic["price"] * shares) TypeError: 'NoneType' object is not subscriptable INFO:werkzeug:10.240.0.64 - - [27/Oct/2018 01:02:11] "POST /sell HTTP/1.1" 500 - ERROR:werkzeug:Error on request:
Check50:
:( sell handles valid sale application raised an exception (see log for details)
Log sending POST request to /login sending POST request to /sell exception raised in application: TypeError: bad operand type for unary -: 'str'
It seems like lookup function doesn’t work properly for sell.
My code in pastebin https://pastebin.com/JRz7DCdq