Questions tagged [pset8]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

How to have multiple anchors on the same page in html?

I'm having a problem while making the pset8, which is Homepage. I'm trying to put multiple anchors in one html file. All these anchor tags are linking to only one of the specified files (ideas.html). ...
user avatar
0 votes
1 answer
37 views

Getting error in pset8 Finance

I get this error in register in pset8/finance when I run check50: :) application.py exists :) application starts up :) register page has all required elements :( registering user succeeds expected ...
user avatar
0 votes
1 answer
1k views

How to fix if statements within event listeners in Javascript

I'm struggling to spot the error in my javascript code in pset8. Specifically the code doesn't execute as I'd expect when using an if statement within an event listener. I've tried talking to the duck,...
user avatar
0 votes
1 answer
749 views

Lab 8 // Resetting button colors not working properly

I am doing the lab 8 trivia question and I am try to reset all the colors of the buttons when you press another from the rest. I am not sure how to do it. I have the function for resetting the colors ...
user avatar
  • 17
0 votes
2 answers
116 views

I cannot get the color of the button to change

<html lang="en"> <head> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet"> ...
user avatar
  • 7
0 votes
1 answer
17 views

Why do my defaultdict get overwritten?

I'm trying to add two lists to a defaultdict, by the following code: for index, holding in enumerate(holdings): # Get all relevant numbers symbol = holding['symbol'] stock = lookup(symbol) ...
user avatar
0 votes
1 answer
64 views

Pset8 Finance Register HTTP 500 error

I am working on the Finance PSET8 and am having trouble with the Register part of the problem. This is my application.py code: @app.route("/register", methods=["GET", "...
user avatar
  • 7
0 votes
1 answer
219 views

CS50 finance SELL - Cannot get the code to subtract the stock from the database or index

I have tried a number of versions of this code, except I cannot get it to subtract shares from my ("/") index page it does nothing and shows nothing in the shares column in the transaction ...
user avatar
0 votes
1 answer
126 views

Pset8 Finance personal touch

I decided to go with trading from index without manually typing the symbol. Also, I decided to simply go to the buy/sell page with the symbol pre-selected by a GET method (without quantities being ...
user avatar
  • 1
0 votes
2 answers
268 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 ...
user avatar
0 votes
0 answers
118 views

Final Project - Get sql to work html, python and flask

On my website for my final project I am able to enter the user info on the website, but the information is not being inserted into the sql table. I feel that I am not understanding something very ...
user avatar
0 votes
1 answer
50 views

PSET8 Web Finance - Index/Portfolio - Why do my for loop variables not pull over to Portfolio.html?

I have the below code for my application: #valid stock row queries valid_stocks_rows = db.execute("SELECT symbol, SUM(shares) as sum_total FROM ledger WHERE user_id=:user_id GROUP BY symbol ...
user avatar
0 votes
0 answers
68 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", ...
user avatar
0 votes
1 answer
43 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. ...
user avatar
0 votes
1 answer
160 views

CS50 Finance Register

I was able to figure out the POST and /register, but I am confused on how to use INSERT a new user into users. Any help would be appreciated. Thank you. From application.py @app.route("/...
user avatar
0 votes
1 answer
131 views

FINANCE: GROUP BY doesn't add up the numbers of shares of the same stock

So in index i'm trying to display a table with all the stocks that the user has bought, one row for each stock, displaying the total number of shares in the user's portfolio along with the total value ...
user avatar
  • 35
0 votes
0 answers
31 views

FINANCE: how to commafy numbers in jinja?

I was wondering about how to commafy large digits in jinja so that instead of [$10000 / $100000 / $1000000] these numbers would be displayed as such [$10,000 / $100,000 / $1,000,000] I've been looking ...
user avatar
  • 35
0 votes
1 answer
86 views

pset8 API not functioning

I am struggling with the finance API. I am calling the lookup function as I have seen many others code on these message boards but I keep receiving "none" as the return value from the ...
user avatar
0 votes
1 answer
205 views

Problem Set 8 / Finance. How to incorporate current price (index)

I'm currently struggling with index(). In buy() I created the custom table with, one might say, too many columns. Among others are symbol, name, shares, price, total. So far I was able to plug some of ...
user avatar
0 votes
1 answer
130 views

PSET8 Finance Buy. SQL query not executing

My buy function is crashing at the SQL query where I'm trying to insert data from the transaction into a transactions table. The types of each column are transaction_id(integer, primary key), user_id(...
user avatar
0 votes
2 answers
158 views

Finance Register Checking for Duplicate Username Not Working

I've looked at lots of other questions with people who have code for register, and my SQL code is exactly the same as most of them, but when I register, it lets multiple people have the same username. ...
user avatar
  • 67
0 votes
1 answer
355 views

Showing a picture saved in CS50 IDE in Homepage

I am trying to display a picture on one of my Homepage webpages. I have copied the picture to pset8/homepage subdirectory. If I double click on it, it will open in a new tab in the IDE. My html code ...
user avatar
0 votes
1 answer
23 views

how to autofit a webpage to any screen size

I am pursuing web track for pset8. I am using fixed number instead of percentages for size of each element. How can I make sure that the webpage can fit to all screen / window sizes without getting ...
user avatar
  • 361
0 votes
1 answer
42 views

The tools from the android track are'nt working

I cannot seem to figure out why, but the code and autocorrect from the lectures don't work. I might be because I'm using Nougat, and he's using Pie, but I don't really see why that would make much of ...
user avatar
0 votes
1 answer
315 views

Dynamically change the row colour of a table in HTML that was generated using jinja

As part of PSET8 finance additional implementations, I want to dynamically colour the table in history.html. The simple code uses jinja2? to populate and print out a table in html. {% extends "...
user avatar
0 votes
1 answer
224 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&...
user avatar
0 votes
0 answers
42 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 ...
user avatar
0 votes
1 answer
61 views

Password leak in finance

I'm running into an issue on finance. Whenever I register a new account a google alert pops up and tells me that my password has been leaked and that I should change it. Is anyone else running into ...
user avatar
  • 19
0 votes
1 answer
128 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,...
user avatar
  • 19
0 votes
1 answer
20 views

How to enter Jinja variables as values in my tags

I am using Jinja and am trying to set the "value" of the option to a variable. I tried this: <option value = {{stock['name']}}>{{stock['name]}}</option>, but it thinks that the {{stock['...
user avatar
  • 2
0 votes
1 answer
85 views

PSET 8 Description Struct problems

So I have chosen the iOS path. I have completed every part of the required Pokedex except the dictionary. I am 99% sure that the message I get about failing is because I do not correctly make the ...
user avatar
  • 5
0 votes
1 answer
717 views

Problem Set 8 / Web Track - Finance (Redirect Error)

My functions seens to work fine, but when i have that redirect the user to the homepage (redirect("/")) the application crash and show the error message: 500 internal server error and I don't know if ...
user avatar
0 votes
1 answer
228 views

Problem Set 8 / Web Track - Finance (RuntimeError: UNIQUE constraint failed)

y'all. My register function seems to work just fine when inputting new and different usernames. However, when I tested it for the 403 error (ie the one which checks if there is an already existing ...
user avatar
  • 27
0 votes
1 answer
64 views

Pset8 Finance stocks typed in lower case don't appear in portfolio

I noticed a beta-tester was typing in the stock symbols in lower case. This didn't seem to cause a problem for purchasing or selling, and the transactions appeared in the History table. However, they ...
user avatar
  • 63
0 votes
1 answer
33 views

Pset8 Finance occasional NoneType error

I had someone beta-test the website today and they ran into an internal server error when trying to return to the index/show portfolio of stocks screen. The error was this: File "/home/ubuntu/...
user avatar
  • 63
0 votes
0 answers
55 views

Pset8 Finance def buy() throws internal server error

Everything was going fine and I refreshed the page to check my updates when I got an internal server error and the whole page didn't load. I looked in my IDE terminal and it said File "/home/ubuntu/...
user avatar
  • 63
0 votes
1 answer
4k views

TypeError: a bytes-like object is required, not 'NoneType' in Finance

I finished doing finance and tested it without many errors i would say. Fun fact, i was implementing a change password and it got me this error TypeError: a bytes-like object is required, not '...
user avatar
  • 1
0 votes
0 answers
457 views

FINANCE [UNIQUE constraint failed: users.username] Error encountered using check50

I have finally got my entire program working for PSET8 Finance. I receive no errors in my dev console and all functions are working correctly after registering 15 users. For some reason, though I get ...
user avatar
0 votes
1 answer
51 views

Week 8 web track Code replication problem

So I am trying to replicate the code done in Flask lecture video, which still revolves around submitting and inputting a user's name. I think I have done the exact same code as Brian's, but the code ...
user avatar
0 votes
0 answers
33 views

Pset8 showing code on webpage instead of proper format

I am working on PSet8 and I have this problem now: I can successfully logged in the app, but I landed on the index page that looks like the snapshot below, instead of proper formatting and css style ...
user avatar
0 votes
0 answers
82 views

Pset 8 finance buy internal server error

I am doing PSet 8's finance and am stuck in the buy section because of an error message produced by this code: # Store user's cash balance share_counts = int(request.form.get("shares")) db.execute("...
user avatar
0 votes
0 answers
183 views

PSET8 CS50 Finance: /Check fails to run, does not catch or notify of duplicate usernames

I have been struggling with the check function in PSET8 for a few weeks now, and have run into various problems as I tried to work through my issues. Currently, it seems by check .get function does ...
user avatar
0 votes
1 answer
69 views

int object not subscriptable in register route

Hello: while registering int object not subscriptable error coming, even though i truncate [0] from results. Any thoughts
user avatar
0 votes
1 answer
53 views

Finance: How to check if input is valid in "quote"?

I'm a little bit stuck with checking if user's input is correct. I don't know how to properly call "name" and other fields inside of lookup function to check them. I've tried different combinations of ...
user avatar
0 votes
0 answers
41 views

stuck on pset 8 finance [duplicate]

I have an error in set 8 finance. It says :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found sending POST request to /login sending POST request to /buy ...
user avatar
0 votes
1 answer
70 views

I can't even get register to work. What am I missing?

I'm getting a Error 500 (-Internal error due to server overload) when I attempt to flask run for pset8-Finance. Here is my app.route("/register") @app.route("/register", methods=["GET", "POST"]) ...
user avatar
  • 33
0 votes
0 answers
297 views

Pset 8 Finance TypeError: 'bool' object is not subscriptable

Does anyone know, what can be the source of this error. I have no bools in register or check, but it is haunting me. Maybe anyone can share the tests chec50 does. This is ridiculous. There is no ...
user avatar
0 votes
1 answer
53 views

:( /check route confirms whether username is available PSET8

:( /check route confirms whether username is available route did not return true when username is available Log sending GET request to /check?username=check50student1 checking that status code 200 is ...
user avatar
  • 17
0 votes
1 answer
17 views

Stuck on custom validation

I am trying to do the check part of the assignment in Finance via Bootstrap validation but I am failing miserably trying to understand how it works at all. https://getbootstrap.com/docs/4.1/components/...
user avatar
  • 17
2 votes
2 answers
1k views

pset8 2019 - jinja_env.filters error

I have just downloaded the code for pset8 and the line 26 app.jinja_env.filters["usd"] = usd shows an error. The code hasn't been modified yet and when I run the flask run command I get this error: ...
user avatar
  • 23

1
2 3 4 5
9