Questions tagged [application.py]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
50 views

CS50 Finance Internal Server Error RuntimeError: near “' '”: syntax error

I'm working on the register section of application.py. When I've typed in the username and password and hit register, I get an internal server error. I'm assuming that pbkdf2:sha256:150000$uJ2F7qcX$...
0
votes
1answer
187 views

Stuck at 57% in Pset 8 Finance

I cannot fix some problems in Pset8 because in my gradebook, Finance is still at 57%. Here are the errors that I have after I used check50: :( logging in as registered user succceeds application ...
0
votes
1answer
39 views

CS50 Finance pset8 KeyError on /buy of application.py

I am having real trouble solving the issue I have with the /buy section of the task. I keep getting struck with an issue on the following section of code: db.execute("INSERT INTO transactions (...
0
votes
0answers
136 views

I am getting an errors in the code no idea how to fix them? [duplicate]

I did a little googling pset7 index TypeError: 'NoneType' object is not subscriptable error Found an error similar in my code. But it doesn't say how to fix it. How do I fix the code? ...
1
vote
1answer
413 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....
-1
votes
1answer
74 views

pset7 application.py: again I am still getting error: The server encountered an internal error and was unable to complete your request. Please help! [duplicate]

import os from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions ...
0
votes
0answers
287 views

pset7 finance. I came across with the following error: . Internal error server

import os from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions ...
1
vote
1answer
623 views

pset7 finance check50 doesn't detect a valid sale despite portfolio updating correctly

I'm puzzled why check50 shows me this error despite my portfolio and SQLite database correctly reflecting the sold shares :( sell handles valid sale expected to find "56.00" in page, but it ...
0
votes
1answer
115 views

PSET 7 - Finance - application.py

I was wondering if somehow could help me understand the following snippet of code from the pset distribution code: # Ensure responses aren't cached @app.after_request def after_request(response): ...
0
votes
1answer
22 views

pset7 application.py

I tried to open my application.py file in the IDE today and it is completely blank. All of the code is gone, both the distro code and the implementations I wrote for register, quote, buy and index. I'...
0
votes
1answer
1k views

CS50 finance: Sell function.(Dropdown list of user shares NOT displayed via sell.html)

Purpose of Sell: to make sure the shares bought can be sold by selecting it through a dropdown list displaying symbols of share bought. I am trying to replicate the cs50 finance default page. I have ...
1
vote
1answer
990 views

CS50 Finance (pset7) - register function is not working for application.py in the latest CS50 question

In the latest CS50 - pset7 - CS50 Finance, it is advised to use generate_password_hash instead of pwd_context.encrypt. Also, in the template, there is a change where instead of url_for('register'), /...
0
votes
1answer
245 views

Search function do not work if several words entered

Both mine and stuff solutions do not work for examples like (where there is two of more words from different db fields): https://ide50-username.cs50.io/search?q=New+Haven,+Connecticut // http://pset8....
0
votes
1answer
181 views

Flask run application.py chart is alwys yellow

How the hell this flask works? I made application.py looks like this: from flask import Flask, redirect, render_template, request, url_for import os import helpers from analyzer import Analyzer app ...
0
votes
0answers
285 views

CS50 pset7 application.py buy - problem: won't insert information into new table

I've tried this a bunch of different ways and I can't get it to work. Everything seems to work. The total price of the bought shares gets subtracted from the users table, but I can't get it to ...
0
votes
1answer
117 views

A simple question in application.py sentiments

Why neutral starts from 100.0, why not 0 like positive and negative positive, negative, neutral = 0.0, 0.0, 100.0 and is this right? for tweet in tweets: score = analyzer.analyze(tweet.lower()) ...
1
vote
0answers
105 views

Why my code is always returning an empty array

Here is my code for application.py pset8 search route which always returns 0 or empty array, I can't figure out why, Kindly help @app.route("/search", methods=["GET", "POST"]) def search(): """Search ...
1
vote
1answer
493 views

pset7 index.html, adding buy/sell button which linked to stock respectively

As the last requirement of the pset, I want to try empower users to buy more shares or sell shares of stocks they already own via index itself, without having to type stocks' symbols manually. I have ...
0
votes
1answer
209 views

register function not returning expected apology results

I'm working on the register() method for Pset7. I've written a new html template register.html which seems to work - when I run Flask and click on the register link, I get my newly-created register ...
0
votes
1answer
244 views

Pset6 2017 - problem with application.py

I have a problem with the final part of Pset6 2017 - printing a pie chart showing the distribution of a particular twitter user's tweets according to whether they are positive, negative or neutral. ...
1
vote
1answer
184 views

New users not being entered into database

I'm trying to code the register function for 2017 pset7. The proper screen comes up, and the program behaves correctly for missing username, missing password, incorrectly repeated passwords, and ...
0
votes
1answer
72 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 ...
1
vote
2answers
253 views

cs50 pset7 finance addcash function

I am implementing addcash function to finance and I have one issue with checking if input value is an integer value, the problem is whenever I input non-integer value for testing purposes my page ...
0
votes
2answers
679 views

cs50 pset7 finance index function, index page returns html table with multiple instances of only one transaction

Hi, I’m stuck with pset7 finance for a while. I managed to implement quote and buy functions but got stuck with index. Right now my database has two tables, users an portfolio. Users table is ...
0
votes
1answer
206 views

Query for postal code as well as place and admin name in Search route in application.py mashup

I'm almost done with pset8. Just cant find any documentation that would help me in implementing postal code search in addition to place and admin_name1 search. db.execute returns a string and so ...
3
votes
1answer
2k views

pset6 tweets, analyze.py and application.py

I've been stuck here for a while, any help would be appreciated, thanks I'm getting this error on the console while trying to run ./tweets @cs50: ~/workspace/pset6/sentiments/ $ ./tweets @cs50 ...
1
vote
1answer
3k views

flask.cli.NoAppException Error when trying to launch web server in pset 7

I'm trying to finish up pset7 and was trying to launch the web server to view the result but every time that I do I get the above error. I'm not really sure what I'm doing wrong. I ran flask in the /...
0
votes
1answer
509 views

Pset6 2017 application.py Sentiments

I can't tell how to get the correct scores for positive, negative and neutral under the "TODO" in application.py, here: # TODO positive, negative, neutral = 0.0, 0.0, 100.0 That isn't all we have ...