Questions tagged [pset8]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
16 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
19 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
0answers
44 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
16 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
12 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
25 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
21 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
36 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
41 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
126 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
82 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
71 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
32 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
16 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
35 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
512 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
151 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
41 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
46 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
92 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
42 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
8 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
42 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
132 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
120 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
43 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
14 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
663 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 ...
0
votes
1answer
91 views

Finance pset, register will not insert user data

I've completed register page html, and it works as expected. However, it won't insert the data from the user into the database. There are no errors. I can't seem to find how to debug python/flask ...
0
votes
1answer
73 views

pset8 finance - 500 error when trying to UPDATE users table (updating users CASH balance)

Here is my code so far for "/buy" @app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" # User reached route via GET (as by clicking a link or via ...
0
votes
1answer
21 views

Confused at the indexing of the list variable “rows” for example (if len(rows) != 1 or not check_password_hash(rows[0][“hash”])

I have copied a section from "/login" that was provided in distribution code: # Query database for username rows = db.execute("SELECT * FROM users WHERE username = :username", ...
0
votes
1answer
195 views

CS50 Finance 2019 Check50 errors

I have been stuck on this for a while now. No matter how I change my code nothing works it's the same 3 errors. I think the issue is in my register.html but I can't find anything wrong with it. Here ...
0
votes
1answer
29 views

AJAX form validation

I am trying to validate my form, I am having some difficulty. I have tried two the methods, I like the keyup method but think it will be a bit too complicated. One of the biggest issues is submitting ...
0
votes
1answer
17 views

Define buy or selling function

I am working on pset8 everything is working I have found a snippet of my code which is identical for buying and selling only difference is to subtract or add to current cash. Can someone point me in ...
0
votes
1answer
37 views

having problem in check() in cs 50 finance

The problem is i dont know why my script code is not not executing,it registers already registered users below is my register.html {% extends "layout.html" %} {% block title %} Register {% ...
0
votes
1answer
47 views

Pset8 Finance - SELECT is blank

Stock holdings are not printing on my index webpage. "cash" prints correctly. I think the SELECT on my finance.activity table is somehow coming up blank. I am not receiving any errors, and when I ...
0
votes
1answer
74 views

Pset 8 Finance - check50 error

pset8:finance iam tired of trying what now??
0
votes
1answer
68 views

PSet 8, Finance, cannot submit or reset button on register

I keep getting TypeError: document.getElementById(…).submit is not a function when i try and use document.getElementById("mysubmit").submit(); I've searched a lot and the biggest reason is that ...
0
votes
1answer
122 views

Pset 8 - usd and jinja

How do I use the usd function with jinja? I tried the following: {% for row in rows %} <tr> <td>{{ row.Symbol }}</td> <td>{{ row.Name }}</...
0
votes
1answer
57 views

Javascript isn't running at all in pset8 check

I'm not sure how to run my javascript in pset 8. I used a normal script tag to link it in my register/html file. I'm not sure I need to link it from the application file. Do I need all the JS to be ...
0
votes
2answers
308 views

PSET 8: Finance /check

I am stuck on the final section of PSET8 finance, /check. It seems that the data for "username" is not being passed from the web page to the python script. The value for "username" in the python ...

1
2 3 4 5
9