Skip to main content

Questions tagged [pset9]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 views

Problem with Updated CS50 Finance - all API calls to lookup stocks come back as None

I'm a high school teacher and have been teaching CS50 AP for about 7 years now. I like to make sure that I have a handle on all of the problem sets before going over them with my students. So, when I ...
Brian Smith's user avatar
0 votes
0 answers
59 views

expected to find "112.00" in page, but it wasn't found

It's my first course. I completed the Finance assignment but got stuck for several days due to an error. When running Check50, it gives "expected to find "112.00" in page, but it wasn't ...
Ігор Петрів's user avatar
0 votes
0 answers
48 views

PSet 9 check not working

Evening, I am getting the following error trying to run check on PSet9. I have downloaded a new empty version tested that and get the same error. I'm thinking this is a fault on the CS50 side but if ...
faarn's user avatar
  • 13
0 votes
2 answers
81 views

PSet 9 Sell handles valid sale expected to find "56.00" in page

Like others I have become stuck with the above error, although the site seems to display the correct info, any help would be appreciated: Python Flask Code: @app.route("/") @login_required ...
faarn's user avatar
  • 13
0 votes
1 answer
128 views

CS50 PSET 9 Finance "sell handles valid sale: expected to find "56.00" in page, but it wasn't found"

I already looked through every post I could find on this topic but nothing seemed to work for me yet. I have tried to recreate the error by: creating a new account, buying 4 shares of 'AAAA', then ...
scrypter's user avatar
1 vote
2 answers
59 views

Week 9 - Finance - Foreign Key Mismatch

I'm trying to solve this issue for a week and nothing works! in my /buy route, I cannot update the users table with updated cash after a "buy" order is submitted. Here is an example of what ...
Julia 's user avatar
  • 21
0 votes
1 answer
100 views

Stuck on Problem Set 9 with error buy handles valid purchase expected to find "112.00" in page, but it wasn't found

Been trying to troubleshoot this error with help from the internet but I have been unable to do so. Below is my app.py: import datetime from cs50 import SQL from flask import Flask, flash, redirect, ...
zekaistic's user avatar
0 votes
1 answer
91 views

PSET 9 Finance :( sell handles valid sale

I checked out the other questions that had the same problem, but none of the solutions applied to my problem, so I decided to make my own question. Below is my sell html file with jinja {% extends &...
ChubDubDub's user avatar
0 votes
1 answer
215 views

Pset 9 finance does not pass last checking that "AAAA" is in page

Please someone help me to identify what is the root of the problem. I have little time before the new year to submit this task and the final project. The problem is with the check50 of the history of ...
Greg's user avatar
  • 3
0 votes
1 answer
76 views

pset 9 finance :( sell page has all required elements

i searched around for this type of error and looked at my code, but was not able to figure it out. I had something very similar when debugging the buy function and used a similar process for the sell ...
Xenoshell's user avatar
1 vote
1 answer
188 views

pset9 finance check 50 :( sell handles valid sale

Hi I am working on Cs50 2023/psets/9/finance/ I have looked at this problem and have rewritten the code multiple ways but can't get past this error in the check. I think I have gotten too close to the ...
Leyzer's user avatar
  • 13
0 votes
0 answers
110 views

Pset 9 Finance: expected to find ¨112.00¨in page, but it wasn´t found

I have been tinkering around with Pset 9 Finance for a few days now, but somehow I am unable to pass check50 even when my website looks the same and works correctly. Whys is check50 giving the error : ...
Asaz1el's user avatar
0 votes
1 answer
37 views

pset 9 finance Runtime Error: unsupported value:{'id', 4}

I'm working on pset 9 finance. I have my index nearly done but get an error when a new user logs in. Here is my code for index: app.route("/") @login_required def index(): ""&...
KateOz's user avatar
  • 1
0 votes
1 answer
71 views

Check50 marks my "Quote" as if not functioning properly despite looking identical to the staffs solution

I thought I had finished pset9 and had check50 have a quick look at it and it repeatedly gave me the output: :( quote handles valid ticker symbol expected to find "28.00" in page, but it ...
Ganymede's user avatar
0 votes
0 answers
104 views

tried everything but pset9 finance last check still wont pass even with the usd formatter?

ive tried for so many hours to get this to work and rewrote the code so many times. i think my tired eyes are missing something obvious but i cant figure it out because the website works when i ...
PROGRAMMER1's user avatar
0 votes
0 answers
40 views

can you guys please help me and find out what is wrong with my code? i have been working on this for about 5 hours and cant find what's wrong with it

import os from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from werkzeug.security import check_password_hash, ...
Psystrike's user avatar
0 votes
1 answer
20 views

can't seem to figure out the problem with the sell route code

can't seem to figure out the problem with the sell route code that check50 indicates this is my sell route code: @app.route("/sell", methods=["GET", "POST"]) @...
Michael's user avatar
0 votes
0 answers
14 views

Finance flask unexpectedly closed the connection

hey I'm having an issue with flask run it's been working for about a week and now when I click on it I get the error message: this site can't be reached longurl.dev unexpectedly closed the connection. ...
Paul18's user avatar
  • 1
0 votes
1 answer
22 views

pset9: how to get value of cash from DB

I am trying to render index.html, but I am struggling with displaying cash value. I can see something like [{'cash': 9918.82}]. Could anyone help me to get numeric value from this? Maybe getting value ...
know's user avatar
  • 1
0 votes
1 answer
83 views

CS50 Week 9 - Finance: How do I save the date and time with SQL?

I'm trying to make a new column in my database where I can save the date and time of the purchase. Am I using the datetime function(?) ALTER TABLE purchases ADD timedate DATETIME NOT NULL DEFAULT ...
They think im slow EH's user avatar
0 votes
1 answer
590 views

I just submitted finance and tested my code for all test cases, upon submission I got 25%

I chose to implement finance using AJAX to challenge myself and my code works. No errors under any circumstance but upon submission, I got 25% because the check50 program was looking for error codes ...
Youssef Hamoda's user avatar
2 votes
1 answer
125 views

PSET9 keeps returning no results

I am trying to submit my pset9 Finance problem but I keep getting "no results" even though my tests checking accordingly. What could be the issue
Namdroidd's user avatar
0 votes
1 answer
197 views

:( logging in as registered user succceeds Problem Set 9 Finance TypeError

I can't find the problem with my register function. So, I've been pouring over the code for hours now, tried taking breaks, focusing for a long time, none of it worked. And check50 is really ...
Mohamed Amr's user avatar
0 votes
0 answers
50 views

FINANCE - PSET9

I'm having an issue with pset9-finance, as I keep encoutering this error message: expected to find 112.00 in page, but it wasn't found here's my /buy code: @app.route("/buy", methods=[&...
lmgama's user avatar
  • 1
1 vote
1 answer
1k views

CS50 Finance (week 9 problem set) Check 50 Fails despite program working fine, please help

My program works perfectly when I test it on my own, but when I run check50 it encounters an issue with the "buy" page. The error is """exception raised in application: ...
Seth 's user avatar
  • 31
0 votes
1 answer
114 views

CS50x Pset9 - Finance - checking that "112.00" is in page - buy handles valid purchase

I've tried everything I can think of but I just cant figure out what I'm doing wrong. I've got all the index values, and all other values for that matter, showing in USD. I have a catch in the py.app ...
Jaime Hutchins's user avatar
0 votes
1 answer
76 views

CS50 pset9: Why does 'SELECT last_insert_rowid()' return 0 instead of the expected value when using CS50 SQL library in Flask?

symbol_id = db.execute("SELECT symbol_id FROM symbols WHERE symbol = ?", quote["symbol"]) if not symbol_id: db.execute("INSERT INTO symbols (symbol) VALUES ...
khalildouis's user avatar
0 votes
1 answer
87 views

Check50 PSET9 Finance Failing Throughout

First post here...seems I'm coming unstuck at the pointy end of the course. Hahaha! My code doesn't seem to be passing Check50 through Quotes/Buy/Sell - although the functionality seems to be fine ...
Jumbot's user avatar
  • 3
0 votes
2 answers
109 views

TypeError: 'NoneType' object is not subscriptable in PSET9, but working manually

I am working on pset9 Finance. I have implemented the functionality for purchasing stocks, and it works well when I manually test it. However, when I run the CS50's check50 validation, it returns an ...
Chris's user avatar
  • 31
0 votes
1 answer
83 views

Is there something wrong with my code for finance?

From app.py: @app.route("/quote", methods=["GET", "POST"]) @login_required def quote(): """Get stock quote.""" if request.method == &...
Mo'men's user avatar
  • 1
0 votes
0 answers
196 views

Pset 9 Finance 'TypeError: 'NoneType' object is not subscriptable'

I'm currently doing Finance, for CS50x 2023, but I keep getting the same 'nonetype' object is not subscriptable error. I have tried to debug the error and found out that it is the user_id variable ...
Jonathan's user avatar
0 votes
1 answer
521 views

expected to find "112.00" in page, but it wasn't found on PSET 9 - FINANCE

it is my first time asking here as I've tried various methods and solutions but still unable to solve this problem. I always get stuck on "buy handles valid purchase - expected to find "112....
KiruFlan's user avatar
1 vote
1 answer
284 views

PSET9 Finance - Lookup function returns 402

I have been trouble shooting this for a while now. I have the Quote page working and I verified the stock symbol is being sent over correctly to the lookup function. I have done the export API_Key ...
Eric Engel's user avatar
0 votes
1 answer
415 views

PSET 9 Finance Index Function (jinja2.exceptions.UndefinedError: 'row' is undefined)

I have tried using dot notation in the index.html for loop. I referred to Lab 9 to check my syntax and ensure that I am passing variables correctly from app.py. I have also used flash(stock_rows[0][&...
theiNhibition's user avatar
0 votes
1 answer
110 views

CS50 PS9 finance :( buy exception raised in application: TypeError: '<' not supported between instances of 'str' and 'float'

@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" if request.method == "GET": ...
Karl Kuehn's user avatar
0 votes
1 answer
96 views

Runtime error with Buy function

UPDATED: I've cleared up the runtime error caused by this code, so now it runs but it doesn't work correctly. I just get an apology back even if I submit a valid stock symbol and number of shares and ...
getsendy's user avatar
0 votes
1 answer
48 views

Pset9 Register function not working

Working through Pset9 and every time I try testing my register function I get back an image of a grumpy cat and a 403: Invalid username and/or password message. This is my code for the register ...
getsendy's user avatar
0 votes
0 answers
55 views

In 'Finance' how do I get the page to load?

I have not been able to get any page to load for the Finance problem (even without me messing about with it!). I tried deleting everything and starting again like so: $ wget https://cdn.cs50.net/2021/...
Michael's user avatar
0 votes
1 answer
56 views

CS50 Problem set 9 - Finance - RuntimeError: foreign key mismatch - "holdings" referencing "users"

I'm facing a Runtime Error in /buy when I try to insert information about the stock into the holdings table. Here is my code for /buy: # Update holdings table db.execute("INSERT ...
Abhinav Vutukuri's user avatar
0 votes
1 answer
189 views

check cs50 pset9 finance buy and sell errors

:( buy handles fractional, negative, and non-numeric shares expected status code 400, but got 200 :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found :| sell ...
Hope Braga's user avatar
0 votes
2 answers
221 views

CS50 Finance: Can't add time of transaction

I have managed to complete the rest of the history part except the time of transaction. I have tried several different ways to solve this problem, using data types like "DATETIME" or "...
Eva's user avatar
  • 33
0 votes
1 answer
301 views

CS50x finance PSET 9 - quote does not valid ticker symbol expected to find 28.00 and buy page does not have all required elements

I run into some issues with the quoted.html and the buy.html. I suspect the issue is with my index.html but I am not sure why that is the case. For the buy.html page it states that input field shares ...
Student_102345's user avatar
0 votes
1 answer
696 views

PSET9 finance 'buy handles valid purchase error, expected to find "112.00" in page, but it wasn't found'

I'm having issues figuring out why i'm running into this error. I've tried looking online and seeing what answers I could find but I'm stuck. Any help would be greatly appreciated. Error is: :( buy ...
ResistanceDown's user avatar
0 votes
1 answer
191 views

Finance index.html is not displaying any data at all

I am stuck on index() in finance. I have a working SQL function which compiles all the transactions made by the user and sums the shares of all the repeating stocks - ie creating a list of owned ...
GMplayer210's user avatar
0 votes
1 answer
496 views

RuntimeError: API_KEY not set /pset 9

im using the flask run commend in the finance directory but still i get the RuntimeError: API_KEY not set . and flask-session has alredy the api-key
Ehsan_hrz's user avatar
0 votes
0 answers
120 views

pset9 Finance Check50 bot says submission button not found

I have completed my application for pset9 and have all functions working properly, however check50 doesn't agree with my register implementation. Apparently, I do not have a submission button, however ...
cplusplusnoob's user avatar
0 votes
1 answer
88 views

PSET9 FINANCE SQLITE "no such column exists" while multiplying two columns to update a third

In the Index function on APP.PY of my finance code, I'm getting "RuntimeError: no such column: total_per_share" even though I'm using "AS" to create this column -- please advise. @...
General Noob's user avatar
1 vote
1 answer
204 views

cs50 finance - RuntimeError: unsupported value: <function buy at 0x7f1c380cfd90>

@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" if request.method == "POST": ...
amaka's user avatar
  • 15
0 votes
0 answers
1k views

Here is my cs50 finance /buy code

@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" if request.method == "POST": ...
amaka's user avatar
  • 15
0 votes
1 answer
43 views

PSET 9: C$50 Finance. Why not <input type="number"> instead of text?

From CS50's Problem Set 9 specification: Require that a user input a number of shares, implemented as a text field whose name is shares. Render an apology if the input is not a positive integer. I'm ...
Facundo Lema's user avatar