Questions tagged [quote]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 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
1answer
90 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
1answer
779 views

C$50 Finance Buy and Quote not working

When I test my code myself, it seems to work, but check50 is showing otherwise. Quote has a single problem, and buy has two problems, but I am not able to figure out where in the code is the error and ...
1
vote
1answer
1k views

Pset7 - :( quote handles valid ticker symbol

Check50 showed me expected to find "28.00" in page, but it wasn't found. I don't know where is my mistake. Can anyone help me out? Any help will be greatly appreciated. Here is my quote(): @app....
0
votes
1answer
310 views

PSET7 Finance- Quote and Buy not passing all checks

I've just come back to CS50 after the semester ended and have been trying to debug my program to no avail. The application appears to be working when I test it myself, passes all checks, but has ...
0
votes
1answer
349 views

Finance - Quote - 500 Internal Server Error

I'm really at a loss after trying to get Quote to work for the past two days. I'm able to get the quote.html page to seemingly work but the json query and transfer to quoted.html returns a 500 "...
0
votes
1answer
622 views

pset7 Finance quote not returning anything?

I am working on pset7 finance quote and my code isn't displaying anything in the form that returns the data about the stock to the user. I did some research in the forums and it sounds like there was ...
0
votes
1answer
192 views

Pset 7 - CS50 Finance: "Quote" keeps redirecting me to a register error

When I enter a symbol (stockticker) on my quote page, when I click "submit" the website redirects me to a register page error (403: Must Provide Username) Why would this happen? I don't even see any ...
0
votes
0answers
672 views

Pset7 buy and quote do not pass check50

I ran my code through check50 and it didn't clear the following 2 checks: :( quote handles valid ticker symbol expected to find "28.00" in page, but it wasn't found :( buy handles valid purchase ...
1
vote
1answer
63 views

Helper in finance seems to be missing name

I am currently working on the C$50 Finance problem. The assignment asks to return the stock's name, price and symbol but in the return dict from the helper the name seems missing.. (whereas the ...
0
votes
1answer
233 views

pset7, html: {{ stock.name }} displays same value as {{ stock.symbol }}?

I have question with displaying values from stock structure that returns by lookup - name and symbol are the same. Here is how quoted.html is called #ask for stock stock_symbol = lookup(request.form....
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 ...
0
votes
1answer
1k views

Pset7 finance quote problem

I'm trying to get the stocks by quote and it worked just fine a week ago but it suddenly stopped working. Can someone please explain me what has changed and how I should alter my code to get it ...
0
votes
1answer
39 views

else syntax error finance

I am on pset 7 and my quote function is throwing me a syntax error on else. Anyone can detect it? I know that an error where it is obvious mean that the lines before might be errorneous, but I can't ...
0
votes
1answer
397 views

pset7 finance- quote 'nonetype' object error

I am new to python and am very confused by this error message: AttributeError: 'NoneType' object has no attribute 'startswith' I think it has something todo with nothing being passed into the lookup ...
0
votes
1answer
898 views

AssertionError rears its head all the time

When I launch my web server and test "quote" I get an AssertionError after I search for the symbol. No matter what I change or tweak the error is OMNISCIENT. No kidding. The error states: "...
0
votes
1answer
131 views

pset7 cs50 quote not working neither displaying the apology

@app.route("/quote", methods=["GET", "POST"]) @login_required def quote(): if request =="POST": rows = lookup(request.form.get("quote")) if not rows: return apology("Invalid ...
1
vote
1answer
73 views

Why do I get a wrong html file after executing a quote function? pset finance

I am implementing a quote function in application.py. But the result is ridiculous. After I enter a symbol to search for, I get an apology.html(saying Missing Username!), but this apology.html with ...
0
votes
0answers
56 views

pset7: Quote not rendering apology

I am having issues with rendering apology if symbol isn't entered. What am I doing wrong? def quote(): """Get stock quote.""" if request.method == "POST": if not request.form.get("...
1
vote
1answer
52 views

Quote doesn't render quote_form

I couldn't find any bugs in my code. I followed exactly the same method as register and Login but it still doesn't render quote_form.php. In quote_form.php, I had put this statement as well Can ...
0
votes
1answer
133 views

CS50 - Pset7 - Quote Redirects To Login - 2017

The quote.html renders when I click its link from the main page, but when I submit the symbol, the server redirects me to the login page. It never renders quoted.html. I've tried looking at other ...
0
votes
1answer
75 views

Pset 7, why does my "quote" template not render before apology?

I'm trying to understand why my template, even though copied from a working "login" html and py file, doesn't render for "quote". It just goes straight to return apology.. while the same code works ...
0
votes
2answers
166 views

Help on QUOTE.py PSET7

Please find the images below. When i try to execute quote, it renders me the following error shown in the 2nd image.
0
votes
1answer
104 views

Pset7 Quote: Form does not display, straight to apology

I cannot figure out why my quote form does not display. It jumps straight to the apology function and never prompts the user for a stock symbol. HTML code from quote.html {% extends "layout.html" %} ...
1
vote
1answer
1k views

CS50x2017 Pset7 quoted.html Extracting Dict Items in Template?

I have this route in application.py for quote: @app.route("/quote", methods=["GET", "POST"]) @login_required def quote(): """Get stock quote.""" # if user reached route via POST if ...
1
vote
1answer
1k views

Pset 7 quote - help!

I'm having trouble with the quote method. When I go to the quote tab of my CS50 Finance site, it says: AttributeError: 'NoneType' object has no attribute 'startswith' Seems as if lookup is returning ...
0
votes
0answers
49 views

pset7 Cannot redeclare apologize()

Every time I try to open quote section after writing the necessary code for it, I get the following error. "Fatal error: Cannot redeclare apologize() (previously declared in /home/ubuntu/workspace/...
0
votes
1answer
216 views

Pset7, I cannot display result of quote

Pset7, I cannot display result of quote. Am I misunderstanding concept of render function? Quote form is displayed, just not result... Could anyone gives me any advises, please? quote: if ($_SERVER["...
1
vote
1answer
82 views

Explain the syntax for function render in PSET 7

I don't completely understand this line of render. function render($view, $values = []) I know it passes two arguments, the second is an empty array that you can fill I think? I used this in 'Quote'...
1
vote
1answer
116 views

I am working on the quotes' section of the pset7. I always get this error which I am unable to understand?

quote.php <?php // configuration require("../includes/config.php"); if ($_SERVER["REQUEST_METHOD"] == "GET") { //do something // else render form render(".....
0
votes
1answer
326 views

Pset7 Quote What does this error mean?

I'm getting this error when I go into my Quote page on the website: Fatal error: Invalid view: quote_form.php in /home/ubuntu/workspace/pset7/includes/helpers.php on line 155 Here's my quote_form....
0
votes
1answer
175 views

pset7 quote - action

When I try to submit a stock symbol for a quote I get the following error: Not Found The requested URL /displayquote_form.php was not found on this server. My form code is: <!DOCTYPE html> &...
0
votes
1answer
176 views

Pset7,Quote,the code gives an error-Undefined variable: message in /home/ubuntu/workspace/pset7/views/quote_output.php on line 1.Please Explain

<?php // configuration require("../includes/config.php"); if ($_SERVER["REQUEST_METHOD"] == "GET") { // else render form render("quote_form.php", ["title" => ...
0
votes
1answer
243 views

pset7 quote display don't work unless lookup runs from the template

I've tried to pass the array from quote.php to a template result_symbol.php using this code. <?php // configuration require("../includes/config.php"); // if user reached page via ...
1
vote
1answer
1k views

pset7 quote.php

in quote.php i am able to take the symbolname from quote_form.php and using lookup function i put the value in $ stock variable , but i do not know how to display it in a new form called quote.php ...