Questions tagged [cs50w]

The tag has no usage guidance.

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

CS50W - Wiki with Django - I want to edit a wiki entry, but I don't know how to send the default value to the template if I use Django forms

I've tried to do this: class editPage(forms.Form): title = forms.CharField() textContent = forms.CharField(widget=forms.Textarea(attrs={'class' : 'textContent'})) def edit(request,name): ...
0
votes
0answers
6 views

CS50w flack (chat) project: channel user list stops updating after a while, can't understand why

This is a weird one, so I've recorded a short video to better illustrate the problem. As an additional feature to my chat app I have a panel on the right that displays the users currently on the ...
0
votes
0answers
20 views

Session issue on CS50s project 1 Book Review

I need to learn more about session. I have book route which goes to a book page stating the description of the book, reviews from other users and write a review. I create a form in html and submit my ...
1
vote
0answers
27 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 ...
0
votes
0answers
20 views

CS50W Project 3 Order?

Hope you all are doing well during tough times. Okay, I am doing project 3 currently. I have completed the "Menu, Adding Items, and Registration/Login/Logout" parts of the assignment. Could anyone ...
0
votes
0answers
18 views

Problem with Flask Flashing message - messages appears twice

I'm newbie at Flask. I am trying to manage the flash alerts to appear where I want them. When I write the code get_flashed_messages() in the .html module the messages appears twice, without this code ...
0
votes
1answer
49 views

Please help with socketio messaging

I can't seem to get a message sent to the server and then added to my html document as a list item using socketio. I get to type in a message and click the send button, but then nothing happens. As ...
0
votes
0answers
140 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\...
0
votes
0answers
44 views

CS50W Project 2: socket.io is not working for me

I am trying to create the channels real time so they can be broadcasted and i save them in a list on the backend. I will later make sure that all the channels in the list are also put in the list but ...
0
votes
0answers
26 views

CS50W Project 2: Rooms vs Namespaces

I would like to set up separate rooms (or namespaces? which one is better?) for the channels so the messages can only go to the specific channel. I would do this by getting the name of the channel and ...
0
votes
0answers
68 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\...
0
votes
0answers
21 views

DATABASE_URL in SQL Lecture

I am in SQL lecture. While watching the video, This is shown engine = create_engine(os.getenv("DATABASE_URL")) How does his code execute while DATABASE_URL is invalid. How do I practice while ...
0
votes
1answer
43 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 ...
0
votes
1answer
92 views

CS50W Project2: communication between SocketIO and JavaScript

I'm trying to get new channel names input by the user to 1) show up on the screen in an unordered list and 2) also show up on other users' screens. I tried to closely follow the template that was used ...
0
votes
0answers
105 views

CS50W Project1 TypeError: can't pickle _thread._local objects

My register app @app.route("/register", methods=["POST","GET"]) def signup(): #function to create new users #checking request method if request.method == 'GET': return ...
0
votes
1answer
47 views

goodreads api request return code 404

I have tested my function separately in python and it worked: def get_goodreads_review(isbn): return requests.get(GOOD_READ_URL, params={"key":KEY, "isbns": isbn}) if I set isbn = "...
0
votes
1answer
49 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
1answer
44 views

How to keep track of current user and book in project 1

I am now doing CS50W project 1. After letting user login and having enabled the user to do the book search, I need a way to keep track of the user when he or she is browsing from one page to another. ...
0
votes
2answers
28 views

CS50W Project1: ISBN too short, csv file does not provide correct ISBNs?

I was having an requests.exceptions.HTTPError: 404 Client Error: Not Found for url: error. I noticed after reading some of the documentation on Goodreads that we can use either 10-digit ISBNs or 13-...
0
votes
1answer
56 views

CS50W Project1: how to access specific part of json object

I am working on the part of the project where people can click on a book from the search results page, which will then take them to the specific book's page. I am getting this error: json.decoder....
0
votes
2answers
166 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
0answers
16 views

CS50W Project 1: How to capture radio button choice

I am loading an HTML page which dynamically populates the result of a book search in a set of lists attached to a radio button. The user is to choose which book in particular they are looking for ...
1
vote
1answer
186 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 ...
0
votes
1answer
858 views

socket.io won't connect BAD REQUEST “POST /socket.io/?EIO=3&transport=polling&t=1554987462099-61&sid=9e90c33eadea427db79c14a251130c15 HTTP/1.1” 400 -

I am trying to finish cs50w project 2 but I can't get socket.io to connect (at least i think that is the problem) I went into the source file and tried to recreate their example from vote1. This is ...
0
votes
0answers
87 views

Issue with CS50W's Project2 - submitted text not passed to chat window

I have a problem regarding passing posted messages into the proper field and presenting them to the user. The app is supposed to transfer the text submitted in "messenger" into the "messages" so to ...