Questions tagged [cs50-web-programming-with-python]

Filter by
Sorted by
Tagged with
2
votes
1answer
985 views

Flask Sessions Not Working

I'm using VS Code and following along Brian's Flask class in Web50. I have copied his notes program word for word, and somehow I get different results. I've downloaded Flask and Sessions, so that's ...
2
votes
1answer
258 views

How to integrate handlebars(written in raw javascript) into django templates

Please, I'm still rather new to handlebars templating, my handlebars template works perfectly with just html files, but when I try to render the page containing the handlebars template, I get all sort ...
1
vote
3answers
231 views

CS50W - Mail - Python Timestamp Error?

Per the problem set, I've not changed any of the Python that's included within the problem set for 'Mail'. I've only been tweaking with the JS and the HTML thus far. That's not to say my JS is ...
1
vote
1answer
168 views

CS50 Web Programming Mail Pset - DOM reloading on every form submission

On the mail pset the inbox page loads as default whenever the DOM is loaded. Whenever I submit my form to send an email the DOM is reloaded and inbox pops up. I'm trying to get the sent mailbox to pop ...
1
vote
1answer
823 views

CS50W - Project 0 - "I'm Feeling Lucky"

For the "I'm Feeling Lucky" part, I'm getting a redirect notice (like this: https://images.app.goo.gl/Mgk6knNBYHfe5YKB7). How do I bypass this? Thank you!
1
vote
2answers
677 views

Can't create table from postgresql through sqlalchemy in python

I am working on project 1 of python and javascript web programming and have no clue why it just can't create table. The coding execute without returning any error. Below is the code and I really ...
1
vote
1answer
294 views

cs50web switch from submit50 to me50?

I started with cs50 web earlier this year, completed the first 3 assignments and then submitted by pushing them to the relevant branch of the submit50/USERNAME.git repository, and got a grading email ...
1
vote
1answer
653 views

CS50-Web programming not showing up in course section CS50.Me

I enrolled in CS50 Web Programming with Python and Javascript through EDX. After linking my Github and EDX with cs50.me I expected that the course would show in my course list, but is still has not. I ...
1
vote
2answers
346 views

Help with Search Bar - Wiki Project1 CS50 Web Django

For the Wiki project I'm having trouble implementing the search bar. I have spent about 2 days researching search bars in Django, but so far everything I've tried yields the same result: No matter ...
1
vote
1answer
201 views

Instance of 'scoped_session' has no 'execute' member

Getting the following problem using flask and SQLAlchemy: "Instance of 'scoped_session' has no 'execute' member pylint(no-member)". I use Windows 10, Flask. I suppose that the problem is somehow ...
1
vote
1answer
15 views

cs50 web programming, wiki: extend function not working

I'm currently on project 1 wiki in cs50 web. The distribution code already gave me the blocks on layout.html and extend functions on index.html. For some reason, the code I put in the blocks in index....
1
vote
0answers
381 views

CS50 Web 2020, Project 1 - Wiki, CSS not working

I'm currently using Django as explained in cs50w 2020 lecture 3. Under the static folder inside encyclopedia directory is the styles.css. This was in the distro code and there is already some styles ...
1
vote
0answers
204 views

decoding to str: need a bytes-like object, HttpResponse found

While converting markdown to html i am getting this error def title(request, title): global mdValue mdValue = util.get_entry(title) htmlValue = m.convert(mdValue) # error occurs on this ...
1
vote
0answers
35 views

cs50w Project 1: Web page running very slow

I just finished my book review page for project 1 and everything is working fine, but the site takes forever to load certain parts. When trying to log in or create a new account, or when trying to ...
1
vote
0answers
2k views

sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string

Traceback (most recent call last): File "list.py", line 9, in engine = create_engine(os.getenv("DATABASE_URL")) File "C:\python 3.8\flask_env\env1\venv\lib\site-packages\sqlalchemy\...
1
vote
1answer
447 views

API Goodreads issue with the book page

I have been facing an issue with the API, it does not display in the book page in project1 I keep getting the error "Not Found" could someone help me? Check the screenshots of the python code below, ...
0
votes
1answer
403 views

Does anyone know how to use Django on CS50 IDE?

I can’t seem to run Django on CS50 IDE. I downloaded Django without a problem. I can create a Django app without a problem using "python manage.py startapp hello". But the problem comes when ...
0
votes
1answer
140 views

Cs50 Web Programming - How to autocomplete - Project 1

I am doing project 1 and I have a problem. While doing the search page, I have show possible autocompleted texts to help the user with the search, but I don't know how to do that. I know it was shown ...
0
votes
1answer
32 views

PSET9 / can't check until a frown turns upside down

I am getting this message in the following checks :| sell page has all required elements/ :| sell handles invalid number of shares :| sell handles valid sale I guess the problem is in by sell or buy ...
0
votes
1answer
323 views

CS50 (2021) - Finance. :( registration rejects duplicate username - expected status code 200, but got 400

I´ve been struggling to complete the Pset9 - Finance, version from 2021. After reading multiple threads I decided to post here the issue, looking for some guidance so I can move forward in the course. ...
0
votes
1answer
311 views

Edit Function Help - CS50 Web Project1 Wiki

I've been having trouble with the edit function for the wiki project1. So far I've tried many different approaches but nothing has worked. I have the "edit" button on every entry page of the ...
0
votes
1answer
109 views

PSET8 Finance Buy. SQL query not executing

My buy function is crashing at the SQL query where I'm trying to insert data from the transaction into a transactions table. The types of each column are transaction_id(integer, primary key), user_id(...
0
votes
2answers
613 views

CS50W - Wiki w/ Django - Search Bar

I cannot for the life of me get the HTML form to transfer the user's search into my search function within views.py. I've tried this a number of different ways and I either just get no movement (as I ...
0
votes
1answer
1k views

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: character varying = integer

In this code when I search in the book 0 index it shows the error ..... but the statements in elif statement work perfectly. When I manually enter the value instead of putting sea variable in my query ...
0
votes
1answer
43 views

C$50 FINANCE- BUY ERROR

I have a problem with my code on buy. I was wondering if anyone can help me identify the error. Whenever I go to the buy and enter the symbol and shares and click buy, it shows a 500 Internal Server ...
0
votes
1answer
111 views

CS50w Project1: Trouble posting reviews (Row Proxy error - how to ensure a tuple)

The last bit I am struggling with on Project1 is posting a rating and review. I continually get sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) can't adapt type 'RowProxy' [SQL: INSERT ...
0
votes
2answers
510 views

CS50W Project1: Type error cannot pickle _thread._local object

Currently working on CS50W's Project1, working with the GoodReads API. I thought the Register/Login/Logout requirements would be easy and quick for me to complete since I did it already with the CS50 ...
0
votes
1answer
26 views

CS50_Web ORMs,APIs_ lecture 4, classes4.py - Understanding Classes, Objects, Functions and Lists

I've "simplified" the ORMs,APIs- lecture 4_web_classes4.py code to try and understand more about Python classes, objects and list. can anyone help me out? Question 1: Why doesn't print(self....
0
votes
1answer
167 views

Cannot access CS50 Web settings for GitHub Pages

How can I enable my CS50 Web repo to be hosted on GitHub Pages? There is no Settings tab on my CS50 Web repository on GitHib. As such I cannot enable the repo for GitHub Pages as shown at the end of ...
0
votes
2answers
460 views

CS50's Web Programming - Unable to import books.csv file into database

I'm on a project1, here is the link to it: https://docs.cs50.net/ocw/web/projects/1/project1.html I've successfully made a Table books using my Python script, however when I try to import the "books....
0
votes
3answers
629 views

adminer.cs50.net Not working

Guys there has been a problem in the website : "https://adminer.cs50.net" I tried to login multiple times and keeps giving me the error: "Session expired, please login again." could someone please ...
0
votes
1answer
21 views

How does the cs50 video player update the url in real time?

I´m curious about how the timestamp in the URL gets updated as the video plays. Is the server sending GET requests every second?
0
votes
0answers
10 views

cs50web project 4 network - "Edit" feature - how to execute two fetch() without the need to create a time delay?

Working on "Edit" feature for project4 network. I wrote a javascript function with two fetch. First one to update the post. Second one to retrieve the now updated post and show it on page (...
0
votes
0answers
11 views

Search: Getting redirect notice for I'm Feeling Lucky

I'm getting a redirect notice when implementing I'm Feeling Lucky, similar to the below: Is there some way to bypass this notice? or is this acceptable for the purposes of this problem set?
0
votes
0answers
23 views

CS50 web network project: like button reloads page and only displays json data instead of the actual webpage

I am working on the cs50 web project network. When the like button is clicked the text in the button should then change to say unlike and the like count should increase by one without reloading the ...
0
votes
0answers
19 views

CS50 Web Wiki Edit Form. Form is returning empty in the edit function

I am having issues with an empty form being provided in the edit function. Everything works well but when I try to edit an entry I get a Value Error saying the HTTPResponse is None and that the ...
0
votes
0answers
15 views

Q: CS50w project3. I keep getting this error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'appendChild') at new_thing

I am working on CS50 Web project 3 and I keep getting this error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'appendChild') at new_thing here is my function function ...
0
votes
0answers
8 views

CS50W-NoReverseMatch Error?

Web Programming Project 1. I can't figure out what is causing this error. Tried searching for an answer everywhere. Error Message Reverse for 'edit' with no arguments not found. 1 pattern(s) tried: [...
0
votes
0answers
84 views

remove 'this field is required' text above django form in wiki

I have a style problem for the wiki project in cs50 web dev. It's one I could ignore and everything would still work, but I have been unable to solve it, and would like to learn what I am missing. I ...
0
votes
1answer
23 views

Specification imposes a 5-minute length limit on videos

I have made a youtube video on Commerce project which exceed 5 minutes. For this cause, my Project2: Commerce submission grading failed. How can I submit the project again. Please help me anybody.
0
votes
0answers
9 views

Server problem exit?

I run the python scraper bot but after a while the problem appears = --- server exit problem ---- how to handle it?
0
votes
1answer
80 views

CS50 web - problem 1, Wiki. Python syntax error

I'm just getting started with CS50 Web's problem 1 (wiki). I've got the code and I'm trying to run the Django server for the first time to see what the source code gives me. I have made no edits to ...
0
votes
0answers
76 views

"I'm Feeling Lucky" button only work if it's a definate keyword

I'm taking the CS50W course and in project0 the instructions is to make an "I'm Feeling Lucky" button that redirects you to the first page like the original does. after monitoring urls and ...
0
votes
1answer
6 views

default relative Imports in Django wiki failing

In views.py, when initially running the pregenerated line from . import util failed with relative import error. The standard from .dir import package also failed. Deleting __init.py__ also has no ...
0
votes
1answer
88 views

CS50Web - Not Sending Emails

I just started with the Mail project for CS50Web and came across a really strange problem. Currently, I'm working on the part where I need to send an email. My algorithm for this is simple: Add event ...
0
votes
0answers
14 views

Project: My "copy to clipboard" functionality works fine on my PC but not on iPhone or iPad :( Any ideas?

I'm doing my final project for CS50 and I have a html page which creates a list of items using a "for" loop, and a button below it which has a "copy to clipboard" function. It all ...
0
votes
2answers
441 views

Mail CS50 Web - How to Send Email (API not working)

I'm very new to Javascript and working on mail, project 3 for CS50 web. I've been working on just sending the email initially, for about a week and I'm getting very discouraged. I can't seem to get ...
0
votes
0answers
69 views

Does anyone know how to use Django with minimal setup? Perhaps in a cloud environment or some IDE?

I can't seem to set up Django on my computer. As for running on my computer, I have just installed python and I think pip comes along with it? So I checked if I had pip installed using the command &...
0
votes
0answers
176 views

cs50w Wiki Edit Function: successful edit but NoReverseMatch for edit thrown

My edit function throws a NoReverseMatch (Reverse for 'editpage' with arguments '('',)' not found. 1 pattern(s) tried: ['editpage/(?P[^/]+)/$']) when I try and submit edits on the page. However, when ...
0
votes
1answer
206 views

cs50w Project 1 Wiki Search: layout.html failing to submit POST to views.py

currently working on the search function for project 1. I've updated layout.html, urls.py, and views.py, but when I input anything into the search bar layout.html does not pass the POST information to ...