Skip to main content

Questions tagged [flask]

The tag has no usage guidance.

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
649 views

Having Issues Setting up Flask Server in Project 1

I am having trouble setting up my flask application in Project 1. Here is some additional screenshots of the error messages I get in browser when running flask. Here is some additional info: Running ...
Stephen Tham's user avatar
1 vote
0 answers
2k views

Serve pure html files without jinja in flask

As I am making my final project I get stuck at some points where I don't wish to use jinja as I wish to have my html file as a whole without extending any layout html file. In flask render_template ...
sk.76's user avatar
  • 312
1 vote
0 answers
58 views

NoAppException in PSET8: Mashup

I am unable to start working on PSET8 Mashup, when I view the web page after running flask I get what appears here: Although I am running flask in the directory of mashup. So I don't know why it can'...
Mohamed Ahmed's user avatar
0 votes
0 answers
49 views

PSet 9 check not working

Evening, I am getting the following error trying to run check on PSet9. I have downloaded a new empty version tested that and get the same error. I'm thinking this is a fault on the CS50 side but if ...
faarn's user avatar
  • 13
0 votes
0 answers
56 views

Why does my server says it is a "bad request"?

Everytime I hit the submit button after inserting values, my server gives this message:# Bad Request The browser (or proxy) sent a request that this server could not understand. What does that mean? ...
user40089's user avatar
0 votes
0 answers
24 views

do not get the chance to fill out any input and select fields

Everytime I run flask run and go to the website, I cant see any of the input fields. Instead, I get the message 'must contain a number'.What am I doing wrong? {% extends "layout.html" %} {% ...
user40089's user avatar
0 votes
0 answers
61 views

Problem 9: Finance - flask run error

When I enter flask run in the command line it appears to give the normal response but when I click on the link provided in the terminal, it opens a page in firefox titled: "problem loading page&...
robonozzo_39's user avatar
0 votes
1 answer
333 views

CS50 2023 Finance Check50 issue

There is no way to get rid of the following check50 error: :( logging in as registered user succeeds application raised an exception (see the log for more details) I found through googling that in ...
RaulMuroc's user avatar
0 votes
0 answers
55 views

In 'Finance' how do I get the page to load?

I have not been able to get any page to load for the Finance problem (even without me messing about with it!). I tried deleting everything and starting again like so: $ wget https://cdn.cs50.net/2021/...
Michael's user avatar
0 votes
2 answers
4k views

AttributeError: 'function' object has no attribute 'method'

Hey guys I've been working on my final project. I keep running into this error When I run flask, this error occurs File "/home/ubuntu/project/app.py", line 88, in login if request.method == &...
Lychee Tree's user avatar
0 votes
0 answers
122 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 ...
LUISELLA's user avatar
0 votes
0 answers
359 views

What's wrong with my register function? (Pset9 - Finance)

Here's my register function in application.py: @app.route("/register", methods=["GET", "POST"]) def register(): """Register user""" ...
Rodri-97's user avatar
0 votes
1 answer
234 views

Can't update shopping cart for more than one item, works fine for a single item, otherwise only the first one gets updated

I am trying to update the quantity of the products in the shopping cart by changing the number in the dropdown. If the cart has two or more items then only the first one works and the qty doesn't ...
user14720865's user avatar
0 votes
0 answers
759 views

Problem with endblock tag in finance. "endblock" tag unknown

{% extends "layout.html" %} {% block title %} Quote {% endblock %} {% block main %} <form action="/quote" method="post"> <div class="form-...
catnamedboo's user avatar
0 votes
0 answers
3k views

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@app.route('/api/<string:isbn>', methods = ['GET']) def isbn(isbn): #import api from Goodreads (stats) book_data = db.execute("SELECT * FROM books WHERE isbn=:isbn",{'isbn':isbn})....
Haa's user avatar
  • 1
0 votes
0 answers
29 views

Final Project: dynamic page creation to show just 10 SQL entries per page

I'm developing a web-page for my CS50's Final Project for contacting japanese students around Argentina. The only official japanese exam takes place in Buenos Aires, and there are no many good places ...
Lautaro D. Futuro's user avatar
0 votes
1 answer
544 views

RuntimeError: missing value for placeholder (:name)

all! I'm doing the final project, and I have a form whose contents I'm trying to submit to a database. My python code is: @app.route("/Contact.html", methods=["GET", "POST"]) def Contact(): if ...
Diaresta's user avatar
0 votes
0 answers
21 views

Join table seems showing an error

I tried this statement on the adminer postgreSql database online database query tool and works but when i try to code it into my FLASK app showing nothing. lists = db.execute("SELECT b.isbn,b.author,...
Eyasu G's user avatar
0 votes
0 answers
60 views

Trying to flask run the task session on the CS50 web Lecture DATABASE issue

I had a great time learning about HTML and CSS. Then came this intimidating flask feature. I was able to create a session["username"] to login and logout. I'm trying to use session to create a todo ...
NgKen0995's user avatar
0 votes
1 answer
292 views

Unsure of what my DATABASE_URL is

I am using windows 10 (64-bit) and am following the course "Web Programming with python and Javascript" in CS50, in which i wanted to use my computer as a local host to store the table content. I am ...
Najaaz's user avatar
  • 101
0 votes
0 answers
155 views

Deleting SQL dynamically with Flask

I want to delete a specific row in my database but I don't know how to do it. On my HTML I have this: <div class="cases"> {% for row in rows %} <div class="card border-success mb-...
Ricardo Gusi's user avatar
0 votes
0 answers
2k views

(psycopg2.errors.UndefinedTable) relation "users" does not exist

when i try to load up regster.html i get this error "sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "users" does not exist LINE 1: INSERT INTO users(username,password) ...
beatmaister's user avatar
0 votes
0 answers
706 views

CS50W: "flask.cli.NoAppException" Can anyone explain this?

flask.cli.NoAppException: While importing "application", an ImportError was raised: Traceback (most recent call last): File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask\...
pooja's user avatar
  • 1
0 votes
1 answer
2k views

error while trying to update database using python and sqlalchemy

While I was trying to run create.py file having the following code: import os from flask import Flask, render_template, request from models import * app = Flask(__name__) app.config["...
Ayush Bansal's user avatar
0 votes
0 answers
194 views

How to ensure proper database url in environment variable?

I am trying to run the code from lecture3 and I am having trouble ensuring the database url is properly set using the environment variable. Here's the code: db_url = 'postgresql+psycopg2://{username}:...
S. Miller's user avatar
  • 101
0 votes
1 answer
608 views

Error in Flask application

Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. below is the code in ...
Mohan Patel's user avatar
0 votes
1 answer
45 views

finance: how to build an "active" table

I wish to know how to build a table (in HTML) where the row expand with the row I input on it. For a static table I've used: <table style="width:100%"> <tr> <th>Symbol</...
saquiel's user avatar
  • 153
0 votes
0 answers
55 views

Textbook for understanding session in flask or in general web development?

Is there any good text book available which can explain the concept of session in web development ?
Prashant Singh's user avatar
0 votes
1 answer
191 views

CS50 Web Development Project 2 Attribute Error: module 'engineio' has no attribute 'WSGIApp'

This is my first time trying to run flask on Linux, I've made projects 0 and 1 in Windows 7. I've been able to run Project 2 on Windows, right before I switched to Linux. As I enter "flask run" on the ...
YuriAFGomes's user avatar
0 votes
1 answer
111 views

cs50web socketio : broadcast does not include the sender

I work on ubuntu 18.04. I set up a virtual environment so that I am sure to work with python3 according to the instructions found here:https://vitux.com/install-python3-on-ubuntu-and-set-up-a-virtual-...
Karin's user avatar
  • 59
0 votes
2 answers
3k views

How to pass value from HTML to python?

I'm setting up a new project in python ,and want to setting up a web pageresturant.html using FLASK , this code in html get the selected value from drop down box when button is clicked ,how can i pass ...
Asmaa Abd_El3al's user avatar
0 votes
1 answer
855 views

AttributeError: __enter__

I defined a table in python using sqlalchemy but when i try to create it this error appears
Ahmed Usama's user avatar
0 votes
2 answers
423 views

Can't Connect Python Flask With PSQL Database

every time i try to make connection between python and PSQL this error disappear ?
Ahmed Usama's user avatar
0 votes
1 answer
635 views

Final Project - Problem uploading files to IDE folder

Update: Does anyone know hot to get the folder's absolute path? It isn't ~/workspace/fp/documentos/ or any of it's variations, such as /workspace/fp/documentos/ or workspace/fp/documentos/. It seems ...
Oscar Medina's user avatar
0 votes
1 answer
4k views

Unable to run Flask App using Anaconda Prompt.Do Anaconda support Flask?

I am using Anaconda for editing and running scripts. In Anaconda prompt/command prompt, when I type this command : export FLASK_APP=application.py I am getting the error: "'export' is not recognized ...
san jeev's user avatar
0 votes
1 answer
229 views

please help ! till yesterday my app was working almost fine but today its not even starting ! can someone pls explain this to me?

flask.cli.NoAppException: Failed to find application in module "application". Are you sure it contains a Flask application? Maybe you wrapped it in a WSGI middleware or you are using a factory ...
user21692's user avatar
0 votes
0 answers
481 views

flask redirect(url_for("endpoint")) navigates me to ide50blabla:8080/myEndpoint instead of https://ide50blabla:8080/myEndpoint

I submit a file in my js file : $('#myForm').trigger('submit') That file is sent to and endpoint and there I redirect to another endpoint where stuff is done, the page is rendered again with ...
Karin's user avatar
  • 59
0 votes
1 answer
254 views

Blocked loading mixed active content EM after ajax post request to a flask app

In my browser I see the url and it starts with "HTTPS ://ide50etc". I get the EM however that says "loading... HTTP ://ide50etc". Why does it do that? It doesn't happen all the time. When my session ...
Karin's user avatar
  • 59
0 votes
1 answer
369 views

Uploaded images cannot be rendered in html of flask app

I'm making an app that uploads images and sounds. That had been working very well for a long time. But now suddenly pictures can't be rendered in the html any more after having been uploaded.In cloud ...
Karin's user avatar
  • 59
0 votes
1 answer
49 views

I need a hint how to fix this form

The issue is the Delete Buttons are not working well, so if I am clicking on Delete Title 1 is deleting Title 1 if I am clicking on Delete Title 2 is deleting Title 1. This is the code: @app.route(...
alex's user avatar
  • 3
0 votes
1 answer
92 views

Why flask is returning a default login page instead mine, custom one

I have an issue with my app, since I was adding the feature "users roles" I am getting a strange page content on login page looks like default login page instead of my custom login page and I cannot ...
alex's user avatar
  • 5
0 votes
1 answer
148 views

Final Project with Google Maps ERR_EMPTY_RESPONSE reply for index

I am working on my final project using Google Maps to make a game, and I keep running into the same error: ide50-ssk4988.cs50.io didn’t send any data. ERR_EMPTY_RESPONSE This always seems to happen ...
ssk4988's user avatar
  • 15
0 votes
1 answer
196 views

Flask run application.py chart is always yellow

How does this Flask work? I made application.py look like this: from flask import Flask, redirect, render_template, request, url_for import os import helpers from analyzer import Analyzer app = ...
Maciej Ś's user avatar
0 votes
1 answer
170 views

Rectify implementation of register function in pset7 - finance (Flask)

def register(): """Register user.""" if request.method == "POST": if not request.form.get("username"): return apology("must provide username") elif not request....
user34304's user avatar
  • 141
0 votes
1 answer
291 views

"No name 'redirect' in module 'Flask'

I am attempting to run the program from lecture 8, but I am experiencing errors with statements on line 1 and 9. I am using the CS50 IDE on Cloud9. I have tried the following: Downloaded my ...
Haugum's user avatar
  • 1