Questions tagged [finance]

The tag has no usage guidance.

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

Finance: how does the "errorhandler" work?

I am trying to understand the errorhandler function in pset9 finance. In the given application.py: # Original version def errorhandler(e): """Handle error""" if ...
0
votes
1answer
37 views

Cs50 Finance :(sell handle valid sales :values appearing in index table but check50 doesnt recognise it

updated the code to display history properly,ie when sold shows negative,and when bought shows positive updated index to remove entire row when stocks is 0 I cant figure out why check 50 is not ...
0
votes
0answers
13 views

NameError in Pset: Finance

Cause application raised an exception (see the log for more details) Log sending POST request to /login sending POST request to /buy exception raised in application: NameError: name 'stock' is not ...
0
votes
1answer
20 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 ...
0
votes
1answer
28 views

Check50 says buy allows fractional, negative numbers but it doesn't. Where am I going wrong?

I'm down to my last check50 frown (:( buy handles fractional, negative, and non-numeric shares expected status code 400, but got 200) but my code doesn't allow for these, so I don't know what to do. ...
0
votes
0answers
16 views

I have an error in register function (Week9 Finance)

I would like to ask for your help please with an error I keep getting on my code for the week 9 Finance. I have been receiving like this Here is my login/ register function below. @app.route("/...
0
votes
0answers
13 views

Week9, Finance " :| logging in as registered user succeeds "

I would like to ask for your help please with an error I keep getting on my code for the week 9 Finance. I have been receiving :| logging in as registered user succceeds can't check until a frown ...
0
votes
0answers
17 views

" can't check until a frown turns upside down " annoys me (Finance, week9)

I got like this: :| quote page has all required elements can't check until a frown turns upside down :| quote handles invalid ticker symbol can't check until a frown turns upside down :| quote ...
0
votes
0answers
11 views

CS50 Finance Error: Expected something but got other

I'm struggling with register function in application.py since I am having error messages in check50 That says: :) register page has all required elements :( registering user succeeds expected ...
0
votes
0answers
16 views

CS50 Week9 Finance I have an error in register

I'm struggling with register function in application.py since I am having error messages in check50 That says: :) register page has all required elements :( registering user succeeds expected ...
0
votes
1answer
27 views

Why does my lookup function keep returning "None"?

I have the latest (I think) distribution code and I have exported the API key. Here is my code and it keeps returning 'None'. I can't figure out why I can't look up a stock quote. Do I need to change ...
0
votes
0answers
10 views

How do I get an API key from IEX?

I've just started on pset9 finance, but I can't create an account with IEX. When I try, it tells me that my email address is already in use (this is definitely not true - I'm using a relatively new ...
0
votes
1answer
39 views

Finance (buy) having trouble to update the table

So I'm trying to update the "share" column in an existing row in the table portfolio instead of creating a new one when buying a stock that the user already has, here is my code: def buy(): ...
0
votes
1answer
20 views

Finance - register: Always getting 500 error

I am struggling with the implementation of register. I started small, just copied the content of the already defined login-function as well as the content of login.html. So, my first attempt is just ...
0
votes
1answer
28 views

pset9: finance // jinja syntax error in index

I'm working on my index page and I have two errors. For the first, I'm not sure what's wrong. It seems like it's something with my return statement but I have no idea what's wrong with it. File "...
0
votes
1answer
27 views

I'm on pset9 right now and I'm running check50 on my code and getting :( logging in as registered user succeeds expected status code 200, but got 403

I've tried everything that I thought could be the problem but nothing is working. I registered and tried logging in but I keep getting '403 Invalid username and/or password' error This is my login ...
0
votes
0answers
22 views

CS50X Finance: check50 says buy isn't handling valid purchase. But it is handling fine

I'm wondering what is being tested because its looking for the value 112. expected to find "112.00" in page, but it wasn't found I'm flashing the result of the buy transaction on the index....
0
votes
0answers
21 views

Pset Finance - issue with usd

I'm stuck with pset9 Finance... When I try to sell a quote and return to index.html, I have an error with : File "/home/ubuntu/pset9/finance/templates/index.html", line 1, in top-level ...
0
votes
1answer
40 views

check50 errors for "buy" and "sell"

I get below errors from check50: :( buy handles invalid ticker symbol application raised an exception (see the log for more details) :( buy handles fractional, negative, and non-numeric shares ...
0
votes
1answer
32 views

What mistake am I doing in the below "buy" and "sell" code.? I get the below errors from check50

I get the below error from check50: :( buy handles invalid ticker symbol application raised an exception (see the log for more details) :( buy handles fractional, negative, and non-numeric shares ...
0
votes
0answers
10 views

What mistake am I doing for the below "sell" code.?

What mistake am I doing for the below "sell" code: @app.route("/sell", methods=["GET", "POST"]) @login_required def sell(): """Sell shares of ...
0
votes
0answers
16 views

Why can't I update the Cash balance.? It only shows the balance that was deducted the first time only

application.py @app.route("/") @login_required def index(): """Show portfolio of stocks""" # Select symbol owned by user and its quantity purchases ...
0
votes
1answer
54 views

Pset 9 Finance index function, current stock price not displaying correctly

I am working on getting the proper information to display on the index page. I have one piece left, and it is displaying the current value of the stock. When I look at my output for my 'user' and '...
0
votes
0answers
26 views

ADD EXTRA CASH IN FINANCE

Trying to add extra cash to my pset finance. I have made as you can see below in the picture, that is adding an extra part of code to the index function(), but I'm just getting a 404 answer. Why is it ...
0
votes
1answer
35 views

CS50 Finance index doesn't display what it needs to

I'm at the last check for the 'buy' part and I keep getting: :( buy handles valid purchase expected to find "9,888.00" in page, but it wasn't found I'm pretty sure that number is supposed to ...
0
votes
1answer
36 views

Buy/Sell on Index - button attributes & form value issues

I've got a couple issues adding my own buy/sell buttons to the index page. First, each "Buy" or "Sell" buttons opens up the form for all of the table rows. How can I modify these ...
0
votes
0answers
146 views

Pset 9 finance-Problems for type= number output on the webpage

I am working on a CS50 task called "finance". The problem is that I get an error when I want to check the integer value of the share amount and put it on a separate template for checking my ...
0
votes
0answers
10 views

Q: how to read terminal window and debug in Finance?

I am receiving errors (in red) in my terminal window. However I'm not understanding what those errors actually mean. Can someone help direct me on how to 1) read the error 2) find out where exactly ...
0
votes
1answer
75 views

PSET 9 Finance index.html issue with displaying table results with html

I'm currently on CS50 PSET 9 Finance and stuck on the index.html portion of the assignment. This is my code from assignment.py: @app.route("/") @login_required def index(): stocks = db....
0
votes
1answer
41 views

check50 on finance pset

I'm having 2 problemas with my check50: :( buy handles fractional, negative, and non-numeric shares :( sell handles invalid number of shares As shown in the code below, my input in buy and sell is ...
0
votes
1answer
38 views

Buy Finance Pset9 Cash not working

I am working on pset9 finance and I have been stuck for a while on it, especially this part: cash = db.execute("SELECT cash FROM users WHERE user_id = :userid", userid= ...
0
votes
1answer
17 views

Problems when deploying "Problem9: Finance" to Google cloud platform

I'm trying to deploy "finance" to the google cloud platform. My solution passed the check50 test 100%. To deploy it to the google cloud platform, I kept all the ordinary code, only removed ...
0
votes
1answer
44 views

PS9 Finance - Check50 - :( buy handles valid purchase

I am running into an issue with check50 on my buy function. Check50 gives me the following error: :( buy handles valid purchase Cause application raised an exception (see the log for more details) ...
0
votes
0answers
23 views

Week 9 - Finance. How could I check de return?

I am coding the week 9 problem (Finance) and I am part of (quote) and I have some doubts. The lookup () function returns (none) if the API does not find (stock). I am interested in how I check using ...
0
votes
1answer
44 views

Pset9 Finance Sell select menu

I'm doing the "sell" part of the Finance pset. I am trying to display the stocks someone is able to sell on a HTML page with a select menu. The problem is that they don't display properly on ...
0
votes
0answers
16 views

Index route_TypeError: 'NoneType' object is not subscriptable

I tried to run the program and encountered this error: My code: @app.route("/") @login_required def index(): """Show portfolio of stocks""" # Selecting ...
0
votes
1answer
26 views

Pset9 Finance - How do I load the symbol into my input box on the Buy.html?

I am successfully getting the symbol from the button (as see in image) but I am not sure how load it into the text field as value to be submitted. Please help.... @app.route("/buy", ...
0
votes
1answer
24 views

How to access the values returned by SELECT SUM

I am trying to create the table in pset9 finance to display what stocks the user has. My current attempt tries to do this by summing up the number of stocks in past transactions the user has made. I ...
0
votes
0answers
18 views

database schema for finance PSET9

Just wondering what the best database design is for this particular pset. ATM I have a table for trades which serves to record all transacsatsions (buy and sell), each trade has an unique id, and ...
0
votes
1answer
22 views

Why is the portfolio not being displayed? I get not errors but nothing is being displayed. I am at a loss as to why I cannot display any stocks

@app.route("/") @login_required def index(): """Show portfolio of stocks""" rows = db.execute("SELECT symbol, SUM(shares) as Total_shares FROM ...
0
votes
1answer
24 views

PSET 8 Finance ":( buy handles valid purchase exception raised in application: TypeError: 'method' object is not subscriptable"

I've been having a problem with CHECK50, I cant seem to find the right object to change. This is the log I get sending GET request to /signin sending POST request to /login sending POST request to /...
0
votes
0answers
70 views

C$50 Finance: ":( sell handles valid sale expected to find "56.00" in page, but it wasn't found"

Check50 does not seem to think that the values in my table in index.html are updating correctly. After an afternoon of testing and searching through here and stackoverflow for similar issues, I cannot ...
0
votes
1answer
120 views

API key or look up function error in cs50 finance pset9?

I was working on the implementation of buy and trying to buy stocks when all of a sudden I began receiveing incorrect/invalid stock symbol for every stock symbol I tried(as if the stock symbol was not ...
0
votes
1answer
106 views

PSET 9 Quote function not working correctly

Lookup function always returns "None". Weirdly the same code produced correct results yesterday but as of today it stopped. Any thoughts why? The code for the quoted.html and application.py ...
0
votes
0answers
77 views

Pset9 Finance| "Index table" doesn't display all the companies

I'm doing pset9 "Finance" and I've designed the two tables in the database, one with purchases and the other with transactions. Now when I render the index page, the shares of only one ...
0
votes
1answer
49 views

Runtime Error Unsupported Value in pset9 Finance

I'm doing Pset09 "Finance" and I have been stuck in the "index" function for quite a while. I tried to use the already existing "trans" table but I am getting an error. ...
0
votes
0answers
31 views

issue with my "Buy" code in finance problem set

There is a syntax error when I try to insert the buy information into my trade table. Here is my code. The issue is at the long db.execute line. Any guidance would be great. Thanks. def buy(): &...
0
votes
0answers
13 views

pset9 finance // expected to find "112.00" in page, but it wasn't found [duplicate]

Hi I was testing out my code for the buy function to buy a stock but once I tried to buy a stock it gave me this error: expected to find "112.00" in page, but it wasn't found and I am not ...
0
votes
1answer
132 views

pset9 buy function // buy handles invalid ticker symbol and handles valid purchase having error

I ran check50 to check some things that were wrong and I got 2 errors but when i check the details of the error it doesnt really give me a detailed overview of the problem so I am not really sure how ...
0
votes
0answers
28 views

Finance problem set. Register is not loading

I can not get the register page to load. I assume something is wrong with /register section of application.py, but can't find my problem. Any help is gratefully appreciated. Here is my code. @app....

1
2 3 4 5
10