Questions tagged [pset8]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 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 ...
0
votes
1answer
15 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 ...
0
votes
0answers
18 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", ...
0
votes
1answer
22 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. ...
0
votes
1answer
29 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("/...
0
votes
0answers
7 views

Navbar does not display entirely and dropdown does not work

I was trying to use a NavBar from Boostrap. It displays and works fine when looking to the entire page. But when minimized or in the phone the navbar does not display entirely and when I try to open ...
0
votes
1answer
21 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 ...
0
votes
0answers
14 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 ...
0
votes
1answer
15 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 ...
0
votes
1answer
35 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 ...
0
votes
1answer
37 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(...
0
votes
2answers
36 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. ...
0
votes
1answer
53 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 ...
0
votes
1answer
9 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 ...
0
votes
1answer
33 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 ...
0
votes
1answer
22 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 "...
0
votes
1answer
89 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&...
0
votes
0answers
25 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 ...
0
votes
0answers
23 views

Pset8 migrating to GCP yields 502

My apology for this long thread, I included many details for clarity. I am about to start my CS50x final project (I took web track), but think of having shorter url and always-on server. So I tried ...
0
votes
1answer
34 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 ...
0
votes
1answer
28 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,...
0
votes
1answer
12 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['...
0
votes
1answer
60 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 ...
0
votes
0answers
64 views

Problem set 8 / Web Track - Finance (sell does not update)

My code is almost done, but the sell function does not update the index table and at the terminal shows no error... How may i solve this?? Thanks in advance. Here is my fully code: import os from ...
0
votes
1answer
230 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 ...
0
votes
1answer
110 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 ...
0
votes
0answers
86 views

CS50 Week 8 : Web Path - Flask Secret Key

I coded the code below following the lecture for CS50 Web path, for the database part https://www.youtube.com/watch?v=zdH1PnWxSpA&feature=emb_title minutes 6 It runs fine on the video, but it ...
0
votes
1answer
38 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 ...
0
votes
1answer
22 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/...
0
votes
0answers
45 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/...
0
votes
1answer
798 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 '...
0
votes
0answers
179 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 ...
0
votes
1answer
47 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 ...
0
votes
0answers
28 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 ...
0
votes
0answers
69 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("...
0
votes
0answers
109 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 ...
0
votes
1answer
49 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
0
votes
0answers
21 views

Hello Folks: username already taken even i type single letter under webpage for registering user

username already taken can anybody point where is the mistake in application.py or register.html? https://pastebin.com/5nmP50y9enter link description here
0
votes
0answers
9 views

Pset 8 Finance BOT50 gives back “No result”

I am having problems submitting the Finance problem set. Every time I submit it, bot50 takes a lot of time and at the end says, “No results”. Tried resubmitting many times but to no avail. I have also ...
0
votes
1answer
26 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 ...
0
votes
0answers
31 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 ...
0
votes
1answer
46 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"]) ...
0
votes
0answers
167 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 ...
0
votes
0answers
165 views

pset8 finance index

I'm currently working on pset8 Finance, and I'm having problems with index.html. It looks like my python function works well, but when I apply multiple buyings the relevant page shows only the first ...
0
votes
0answers
45 views

pset8 Finance check() issues

I've been struggling with check() for days now. My preventdefault doesn't seem to be working and this still returns 200 when username is duplicated. Here's the flask part: @app.route("/check", ...
0
votes
1answer
40 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 ...
0
votes
1answer
15 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/...
2
votes
2answers
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: ...
1
vote
1answer
21 views

Iterate over a list of dicts and get key value pair of specific keys

I'm trying to iterate over a list of dicts and get only the symbol and company name out of it maybe store in another dict, I tried parsing the json file directly and failed. I tried searching all the ...
1
vote
0answers
9 views

Running to pset8 IEX API in IDE50 offline from UK may not work

I build all of my psets using the Docker id50 offline, which until now has been fine apart from you can't run check50 or submit50. The work around is to simply upload the project, when done, too the ...

1
2 3 4 5
9