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

Filter by
Sorted by
Tagged with
2
votes
1answer
214 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
200 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
131 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
640 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
1answer
681 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 ...
1
vote
2answers
617 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
269 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
623 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
154 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
170 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
0answers
159 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
33 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
437 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
157 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
127 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
143 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
160 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
95 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
480 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
659 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
41 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
90 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
468 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
25 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
135 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
444 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
557 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
20 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
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
42 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
29 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
4 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
37 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
12 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
1answer
127 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
43 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
82 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
98 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 ...
0
votes
0answers
12 views

How does the server know if the client has received the data completely?

As i've understood, the client first enters a domain name and the DNS returns it an IP address where the client sends his request and gets a response from the server. Now while sending it back, the ...
0
votes
0answers
18 views

Issue using Mingus package in CS50 project: /bin/sh: 1: lilypond: not found

I am trying to use the Lilypond module from the Mingus package (for my final project) in CS50 IDE, but while running the following python code (as provided in the docs), it returns an error: >>&...
0
votes
0answers
26 views

Confusion in cs50 Javascript course 2020

In the Javascript lecture pf CS50's Web Programming with Python and Javascript , there is an example where Brian tells that how to use dataset and fetch the value of it in the case of multiple buttion ...
0
votes
0answers
56 views

CS50W - Project 4: Network - Followers Model

I'm having trouble implementing the followers part of this project. The spec seems to say that you should have a seperate model called Followers, and not just add a followers field to the User model. (...
0
votes
1answer
192 views

CS50W Django Project1 Wiki - Textarea issue

I got stuck at completing Wiki assignment because of strange behaviour of textarea in form, needed for creating and editing entries. Everytime user saves the entry, for each line of entered text there ...
0
votes
1answer
95 views

CS50Web: Project1 Wiki - Error loading markdown2 module

I've tried to import the markdown2 module in my views.py file but I get an error ModuleNotFoundError: No module named 'markdown2'. I've tried restarting my machine, uninstalling and reinstalling the ...
0
votes
0answers
21 views

Flask-WTF: input field rendered based on the user's selection

I'm trying to make a form where the user logs an action they've done. Because there were too many actions, they are now split into categories and then, based on which category the user chooses, the ...
0
votes
1answer
87 views

cs50 web programming with python & javascript. Entry not saving and I can't figure out why

I am a newbie coder and I just started the cs50 web programming course on edEX. I seemingly cannot get my code to save a .md (markdown file) in a directory. For now I am just trying to save the .md ...
0
votes
1answer
39 views

Struggling to debug my code as I can't get print statements to work

I've been working on Project 1 from CS50W for a few days now and finally got my search bar to appear on my page! The issue I have now is I don't think the input is being pulled in from my form. I've ...
0
votes
0answers
193 views

Django model default value not working

For some reason, the default value for a Django model field I have doesn't work. As in, if the value is left blank by the user when creating an object for that model, then when the value is used in a ...
0
votes
1answer
375 views

CS50 Web Python Project 1 Wiki: entry method causes search method to break

I'm working on Project 1 Wiki. I've independently got the entry and search functions to work, entry works by itself and search works by itself. If un-comment the code related to entry, search breaks. ...