Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
379 views

CS50 pset8 finance buy

I have been struggling with the buy portion of the finance assignment for CS50. I have created my new tables and written down the logic concerning buying stocks. When I run flask and try to purchase ...
rutgerv's user avatar
0 votes
0 answers
84 views

Finance - Buy Implementation

I am getting the error message "500 Internal Server Error" when trying to buy shares. Can you please tell me what I am missing? The application.py code is: @app.route("/buy", ...
Leonidas Smiley's user avatar
0 votes
1 answer
50 views

Week 8 - Finance - Buy - Getting Error Message Missing Shares

I'm trying to get the Buy implementation to work but I keep on getting the error message "Missing Shares" when I log into the cs50 finance site and enter in the symbol and number of shares. ...
Leonidas Smiley's user avatar
0 votes
1 answer
313 views

PSET8 Finance Buy

For some reason, my buy function will not work. When I try to "buy" a share of stock, it always goes to internal server error. Here is my code: def buy(): if request.method == "POST&...
leesquared's user avatar
0 votes
0 answers
55 views

Finance CS50 Buy Function - Sufficient Cash check not working

I've been stuck on buy function for PSET8 Finance for a long time now. I'm stumbling at the very beginning and can't seem to proceed further. The code error checks for incorrect or no inputs in the ...
hrithikbansal's user avatar
0 votes
1 answer
172 views

cs50 Finance Runtime error FOREIGN KEY constraint failed

I'm working on pset8 cs50 finance and I'm encountering a runtime error with buy. I've gotten both register and quote to work without issue so I've tried comparing my code to check for incorrect syntax,...
Renée's user avatar
  • 19
0 votes
1 answer
1k views

C$50 Finance Buy and Quote not working

When I test my code myself, it seems to work, but check50 is showing otherwise. Quote has a single problem, and buy has two problems, but I am not able to figure out where in the code is the error and ...
AK2150's user avatar
  • 11
0 votes
1 answer
48 views

CS50 Finance pset8 KeyError on /buy of application.py

I am having real trouble solving the issue I have with the /buy section of the task. I keep getting struck with an issue on the following section of code: db.execute("INSERT INTO transactions (...
akezd's user avatar
  • 3
0 votes
1 answer
248 views

pset8 c$50 finance /buy - transactions RuntimeError: (sqlite3.OperationalError) near "''": syntax error

I'm stuck on pset8 c$50 finance /buy: Form validation works properly but when i try to execute the INSERT INTO transactions table i get the following error: RuntimeError: (sqlite3.OperationalError) ...
Ron Braha's user avatar
0 votes
1 answer
49 views

pset8 finance portfolio on new stock/id

I'm trying to make it so when the user doesn't already own the stock, it adds it to the table. If they do already own it, it should update. The problem is when I try it, it buys 2x what it is supposed ...
Joel Banks's user avatar