Questions tagged [pset7]

For problem set 7 (CS50 Finance)

177 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
1k views

How to call the usd function in the jinja template of quoted.html?

I want to display the cost of the share in Quote tab using the "usd" function defined in helpers.py. I've tried adding app.jinja_env.globals.update(usd=usd)in application.py and then calling the ...
2
votes
0answers
51 views

Students only passing 4/6 the last two showing concatnation error but works locally somebody help

[33mTraceback (most recent call last):[0m [33mFile "roster.py", line 34, in main()[0m [33mFile "roster.py", line 27, in main print(row[0] + " " + row[1]+" "+ ...
2
votes
1answer
291 views

I receive "Not authorized to access this private project" page when trying to get to CS50 Finance page in pset7

I think something is incorrect with my permissions when I'm trying to set up my pset7 materials per the spec. I've followed the spec exactly. I used username50 and password50 to put my username and ...
2
votes
2answers
96 views

Difficulty submitting PSET7 to be graded

My pset7 zip file is about 700kb, i click in "Add files..." button and select pset7.zip, next i click the "Start upload" button, the uploader appears to fill pretty fast as normal but it doesn't ...
2
votes
1answer
160 views

pset7 finance unable to submit

My zipped pset7 folder is about 6oo KB and is taking hours to upload. I eventually abort because it seams to go on forever. In contrast other psets upload in a matter of seconds. Any help is greatly ...
1
vote
1answer
817 views

roster.py not getting output

import sys import cs50 # checking argv (that there's one and it's a csv) if (len(sys.argv) != 2): sys.exit("Usage: roster.py house_name") housename = sys.argv[1] #print(house_name) #open(f"...
1
vote
1answer
103 views

Pset7 Finance Unable to Buy Multiple Shares

I am able to make 1 purchase which appears on my index page, however if I try buy any further stocks my cash goes down but the stocks are not shown and aren't inserted into my portfolio. Here is my ...
1
vote
1answer
65 views

style50 not updating

I recently submitted the pset7/finance in cs50. I checked for style in style50 and it returned looks good! which is an indication that it is correct. But when I submitted to using submit50 I ended ...
1
vote
1answer
66 views

Pset7 Yahoo finance broken

I've been working on this problem for a long time. I've asked people about my code and they say everything looks fine with it, and I've been told the yahoo finance has been taken down. I can't do this ...
1
vote
0answers
216 views

PSET7 check50 error code 400 logging in registered user

Running into issue with PSET7 check 50.It frowns at me and says :( logging in as registered user succceeds expected status code 200, but got 400 Log sending POST request to /login checking that ...
1
vote
1answer
342 views

issues with buy - functionality works but fails check50

Can't figure this out. My code passes functionality it buys stocks no problem but fails check50 with this error: :( buy handles valid purchase application raised an exception (see log for details) ...
1
vote
0answers
83 views

Python PSET7 /Buy

Can't figure this out. My code passes functionality it buys stocks no problem but fails check50 with this error :( buy handles valid purchase application raised an exception (see log for details) ...
1
vote
1answer
92 views

My implementation of cs50 finance goes wrong with check50

My implementation of CS50 finance has security questions as personal touch on the register page. I believe this is why check50 is failing to detect successful user registration. What do I do in such a ...
1
vote
2answers
169 views

Pset7 => "NoneType" error on SELECT query (2017)

I’m really stuck on the index part of PSET7…. Flask keeps iterating over the following SELECT query: dab = db.execute("SELECT SUM(share) FROM portfolio WHERE symbol = :symbol AND user_id = :user_id",...
1
vote
0answers
107 views

Pset7 - Quote always returning apology

So, I'm struggling with pset7 a lot (mostly because I've never programmed before either =/) now I'm on quote and it's always rendering an apology after I fill in the form. I can't quite figure out ...
1
vote
1answer
894 views

AlphaVantage API Error "Please consider optimizing your API call frequency"

On C$50 Finance, when I refresh my web server too many times, AlphaVantage stops returning stock quotes. As a result, Flask returns "TypeError: 'NoneType' object is not subscriptable" when my code ...
1
vote
0answers
81 views

CS50 Pset7 Finance login TypeError: invalid method ''

I got some sort of error when i tried to login with an account that has been registered in my database. I have only done the register function. I can register and automatically login to the website ...
1
vote
1answer
398 views

Pset7 - CS50 Finance - Register - returns the same apology each time

When im testing my code by entering in blank entries in username or password, i expect the site to show me the apologies like "Must provide username" or "Must provide password", but it only shows the ...
1
vote
0answers
53 views

CS50 Final Project: Unique URL for each user of my flask app (2 of 2)

I have a pending question here: CS50 Final Project: Unique URL for each user of my flask app (posted two days ago) regarding the implementation of unique URLs. This unanswered question was in fact ...
1
vote
1answer
421 views

Pset7: from cs50 import SQL - 'No name SQL in module CS50'

Getting the above error at the head of my pset7 programme in the cs50 ide. Any advice? I've tried updating cs50 a couple times. edit: Also CS50 IDE is displaying an error: 'Error: [object Object]'
1
vote
2answers
657 views

Password for phpLiteAdmin

I am requested to enter a password for phpLiteAdmin. I was following steps from the lecture, intro to phpliteadmin. After I inserted a new row ("name", "dorm") into the table registrants, I got this ...
1
vote
1answer
3k views

flask.cli.NoAppException Error when trying to launch web server in pset 7

I'm trying to finish up pset7 and was trying to launch the web server to view the result but every time that I do I get the above error. I'm not really sure what I'm doing wrong. I ran flask in the /...
1
vote
1answer
172 views

unable to start apache

while doing pset7 first phpMyAdmin wasn't working, so I searched online and ran a few commands on the terminal and now even apache is not working and shows the following error: Starting web server ...
1
vote
1answer
44 views

Question about php mailer

suppose I have an email address username@gmail.com can I use this email address to send mails through the php mailer code where in the TODOs the password is the password of username@gmail.com and ...
1
vote
1answer
134 views

PSET7 - Using OOP in CS50 library

I´m really curious about the CS50 library (cs50.php). I noticed that the staff implemented OOP there (object oriented php) but not in helpers.php. I just wonder why? Does anybody know?
1
vote
1answer
206 views

accessing pset7 from outside the appliance

I was just wondering if there was anyway to access the cs50finance webpage from outside the appliance, using a browser for example. I was hoping to get some friends who don't live in the same city, (...
1
vote
0answers
285 views

error: token mismatch for pset7

For pset7, I followed steps to do assignment, just till below Zamyla's first video. When I finished the register.php and open http://pset7/register.php to see the result and open phpMyAdmin Browse tab ...
1
vote
0answers
88 views

PHPMailer library not found

I am trying to implement the phpmailer and I am stuck at the first step calling the PHPMailer library. I have tried multiple path variations, but can't figure out where the library is located, e.g.: ...
1
vote
0answers
305 views

Update Cash in "sell.php" is Not Working

Everything is working file but the cash is not updating. I think its due to typecasting. The value for shares is an integer and price is a float-point integer but I'm confused as to how to cast them. ...
1
vote
1answer
366 views

CS50 Finance not showing up

I'm starting CS50 Finance and I've reached a small hitch. When I try to load the page "pset7"/localhost (After doing all the first steps listed in the spec), I don't get the CS50 Finance logo, but ...
0
votes
1answer
14 views

Fiftyville: Can't find a logical way to find the thief

I have done the appropriate INTERSECTION between the person at the: atm, exiting the parking lot and the person on the first flight out of Fiftyville on the 29th. I am left with two people. I know who ...
0
votes
1answer
35 views

pset7/fiftyville - Some people do not have a passport number

I ran the following query SELECT name, passport_number FROM people ORDER BY name; This was the result name | passport_number Aaron | 9852889341 Abigail | Adam | Alan | 2884243902 Albert | ...
0
votes
1answer
30 views

pset7 - buying and selling from index results in duplicate flash's and apologies not being rendered

I passed all the check50 tests and I am working on my personal touch component, which for me is adding buying and selling to index. Everything works except: When more than one stock is sold/bought, ...
0
votes
0answers
11 views

pset7 roster.py keep getting SyntaxError when printing the output

My import.py file successfully inserted the students into the database but now when I run the following code for roster.py, I keep getting syntax error from sys import argv, exit from cs50 import SQL ...
0
votes
0answers
46 views

Poor JOIN performance?

From my limited understanding, JOIN operations are supposed to generally be faster than nested subqueries. However, when solving the various Movies SQL problems, I'm finding queries with JOINs (...
0
votes
1answer
27 views

7.sql CASE error

I'm getting an error where it says Error: near line 3: near "DESC": syntax error My code is SELECT title, rating FROM movies JOIN ratings ON movies.id = ratings.movie_id WHERE year = 2010 ...
0
votes
1answer
76 views

Pset7 houses - why does my output prints thrice instead of once?

The code is as follows: for row in students_list: first, middle, last, birth = row["first"], row["middle"], row["last"], row["birth"] print(f"{...
0
votes
1answer
353 views

PSET 7 Movies 12.sql

can someone explain the difference between using IN and "="? Here is my code. When I use IN it runs perfectly but when I use "=" there is no output. Thank you! SELECT title FROM ...
0
votes
1answer
152 views

CHECK50 Bug in pset7: movies SQL

I have been banging my head on this for an hour and half. Finally finished the pset, uploaded it. Check 50 says: Now, both cs50 ide and DB browser return the correct results, and number of lines for ...
0
votes
1answer
218 views

pset7 Q7: How many actors are named "Meryl"?

I am at a complete loss for something that should be very simple to find in SQLite. In the IMDB database, I have to find how many actors have the name 'Meryl', I have tried select name, count(name) ...
0
votes
1answer
43 views

I am working through roster.py, but the first line in the solution is not printing in my output. why is this happening?

import cs50 import sys import sqlite3 db = sqlite3.connect("students.db") house_reader = db.cursor() if len(sys.argv) != 2: print('Usage: import.py file.csv') exit() house_reader.execute("...
0
votes
0answers
72 views

Pset7 buy route error due to API use by lookup function

I am experiencing an error each time I call the lookup function within the buy route when the request method equals post. However, calling lookup during quote does not result in the same error. I ...
0
votes
1answer
489 views

pset7/movies/13.sql: exclude Kevin Bacon from the resulting list

In pset7/movies, I want to dynamically exclude Kevin Bacon from the resulting list (e.g. not specifically mentioning his name with NOT or EXCEPT or copying and pasting code that calculates his ID, so ...
0
votes
0answers
175 views

SQL error pset7 houses

with open(argv[1],"r") as inp: reader = csv.DictReader(inp) for row in reader: lis = row["name"].split() print(len(lis)) if (len(lis) == 2): print(row["...
0
votes
1answer
88 views

Not too sure what I did wrong

My program runs fine with the give parameters and outputs what is needed. Students.db also contains the right values. Even after reading a thread similar to this, I still don't know what I did wrong. ...
0
votes
2answers
788 views

pset7 - Houses problem with check50

I'm running into some issue with check50. I know it's been ask before but the answer of some other topic do not apply to me. I re-do both files but still getting the same output. This is my output ...
0
votes
1answer
2k views

Pset7 Houses Issue

I thought I had this one figured out, but check50 disagrees. The specification suggests that the output needs to be formatted as "Harry James Potter, born 1980 or Luna Lovegood, born 1981." To ...
0
votes
0answers
16 views

Why is /sheet is absolutely blank?

Nothing is appearing on /sheet, not even the header. However, the .csv file is generating as intended. Can you help figure out what is wrong with my process? {% extends "layout.html" %} {% block ...
0
votes
1answer
88 views

404 not found error on registered.html

My .csv file is generating correctly and the form works but when I attempt to get an html output I generate a 404 URL not found error. Can you offer any guidance? THe URL seems fine: http://956f859a-...
0
votes
1answer
38 views

pset7 Survey data is displayed on one line, not as a table

I successfully loaded the csv file as a list of lists, passing that list over the the sheet template. Like so: @app.route("/sheet", methods=["GET"]) def get_sheet(): with open("survey.csv", "r") ...