I've got another problem with finance, pset7, CS50x.
When I check50
my solution, I get an error (see first of image) claiming that a KeyError
(on a field named "date_time") occurs when performing a BUY action.
As far as i can see, that error usually occurs when looking up items in a dictionary.
The only time I use "date_time"
as a dict key (see second image) is in the code for the history page.
And in the third image you can see that my history page does work as expected (on my side) after performing a BUY and a SELL.
Is check50 checking something which was not in the specifications at https://docs.cs50.net/2018/x/psets/7/finance/finance.html … ?
flask run
. And the application seems to run flawless at my side. --- I assume that check50 (where the error occurs) will run it at some place that has also updated correctly ...INSERT
could give any hint? I don't thinkbuy
test calls your history.INSERT INTO transactions (userid, transact_timestamp_utc, symbol, bought, price) VALUES (1, '2018-10-19 09:31:27', 'NFLX', 1, 346.71)
(I implemented theUPDATE
of theusers
table as a separate statement, which was issued just before. Apparently, the buy action still works flawlessly at my side.