Questions tagged [cs50w]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Can't execute submit50

I am trying to execute submit50, but I keep getting the same error: You might be using your GitHub password to log in, but that's no longer possible. But you can still use check50 and submit50! ...
0 votes
2 answers
28 views

Problem in using API link in fetch command for AJAX

I'm in CS50w, lecture 5 (JavaScript) I have a problem in lecture 5(JavaScript) time: 1:34:40. Brian said using http://api.exchangeratesapi.io/latest?base=USD in code below: <!DOCTYPE html> <...
0 votes
1 answer
19 views

CS50W Project 2 Commerce - Missing Button

I'm currently working on the commerce project for CS50W. I'm working on the page to create a listing and i've set up my form. However for some reason the code I'm using to display the category is ...
0 votes
1 answer
33 views

cs50w project 1 wiki search issues

There are issues with my search code. Example: If the query does not match the name of an encyclopedia entry, the user should instead be taken to a search results page that displays a list of all ...
  • 57
0 votes
0 answers
32 views

cs50w project1 wiki submit button not working

I was working on cs50w project1 wiki, but I couldn't create a new encyclopedia entry. nothing happens when I click on submit button after inserting entries views.py def createnewform(request): if ...
  • 3
0 votes
0 answers
14 views

Why do I get the path error to view the contents of a single email in the below code.?

In the inbox.js file I am trying to listen for a click event for each email single_email_div and send it to the email view in views.py inbox.js function load_mailbox(mailbox) { // Show the mailbox ...
  • 1
0 votes
0 answers
16 views

How to disable a form from views.py .?

How do I achieve the below: @login_required def close_auction(request,listing_id): listing = Listing.objects.get(pk=listing_id) if request.method == "POST": listing....
  • 1
0 votes
1 answer
26 views

What do we mean by "close" auction.?

In the Project, one of the objectives is: If the user is signed in and is the one who created the listing, the user should have the ability to “close” the auction from this page, which makes the ...
  • 1
0 votes
1 answer
257 views

Big blunder while submitting CS50W Project 0

I am currently doing the CS50W course and was trying to submit Project 0 (Search). I was very confused with the submission process git and submit50. On the project page, it said Otherwise, using Git, ...
0 votes
1 answer
58 views

How to access foreign key in fetch query? (CS50W Mail)

I want to access the actual ID of the sender, right now I can only access the email of the sender. This is the Javascript fetch(`/emails/${id}`) .then(response => response.json()) .then(email =&...
0 votes
1 answer
348 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
2 answers
185 views

Header links won't align to the right (P2)

In the work of search, I wanted to deal with the header links (Image Search and Advanced Search links) not aligning to the right. As I looked into my CSS file, everything works properly except text-...
-1 votes
2 answers
156 views

Can I just copy the Google source code to get a head start? (P1)

In CS50W 2020: Project 0, I have to make a resemblance of Google Search, and its image and advanced counterparts. I don't feel like doing much scavenging, so what I want to do is to copy the whole ...
1 vote
1 answer
73 views

Problems with docker-compose up

To replicate problem: Download Lecture 7 source code Navigate to folder airline1 Type docker-compose up and hit enter Two errors will surface: db_1 will insist on a password, which can be fixed by ...
0 votes
1 answer
96 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 ...
1 vote
1 answer
714 views

CS50w 2020 project3: mail does not show new sent mail after sending

I am almost finished with project 3: mail of CS50w 2020. The only problem is that when I send a new mail to someone the sent page loads without showing the new mail I just sent. I added event....
0 votes
1 answer
666 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): ...
1 vote
0 answers
53 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
1 answer
94 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 ...
1 vote
0 answers
3k 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
0 answers
655 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\...
  • 1
0 votes
0 answers
60 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 ...
1 vote
1 answer
302 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
1 answer
124 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 ...
  • 63
0 votes
1 answer
58 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
1 answer
141 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 ...
  • 63
0 votes
1 answer
56 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
2 answers
71 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-...
  • 63
0 votes
1 answer
110 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....
  • 63
0 votes
2 answers
612 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 ...
  • 63
0 votes
1 answer
21 views

CS50Web Project 0 Center an unorder list when we create a box around

In the CSS style I used this: div{ background-color: darksalmon ; width: 400px; height: 100px; margin: 50px; padding: 20px; } but still, even if I place text-centered it doesn't ...
1 vote
1 answer
356 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 ...
  • 113
0 votes
1 answer
2k 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 ...
  • 13
0 votes
0 answers
94 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 ...