Questions tagged [sqlite3]

The tag has no usage guidance.

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

PSET9 FINANCE SQLITE "no such column exists" while multiplying two columns to update a third

In the Index function on APP.PY of my finance code, I'm getting "RuntimeError: no such column: total_per_share" even though I'm using "AS" to create this column -- please advise. @...
user avatar
0 votes
0 answers
74 views

Can't update sqlite3 on Mac (MacOS Monterey, M1 CPU)

In the VS Code seminar, the tutor walks us through installing (updating) sqlite3 on Mac, but I seem to be running into the same "permission denied" problems he had, and can't get through ...
user avatar
  • 1
0 votes
1 answer
75 views

Lab9 -- Buttons to delete DB entries don't work

Can anyone please tell me why my "Remove Entry" from DB buttons don't work? I included the python.app code below the HTML: <!DOCTYPE html> <html lang="en"> ...
user avatar
0 votes
1 answer
37 views

CS50 PSET7 Movies "query did not return results" 12.sql

First timer asking on Stack Exchange. I have a SQL query that returns 6 results in the terminal but does not work with check50 resulting in "Query did not return any results" I read in a ...
user avatar
0 votes
1 answer
17 views

How do we delete existing flight in sqlite via Django?

In the notes for the SQLITE section, week 3, https://cs50.harvard.edu/web/2020/notes/4/#:~:text=delete%20your%20existing%20flight%20from%20New%20York%20to%20London It states: Every time we make ...
user avatar
0 votes
1 answer
95 views

Week 9 - I need a help about UNIQUE constraint

I am solving the week 9 problem using python. And I am interested in knowing how to deal with the error below using the if and elif? For example: rows = db.execute("SELECT username FROM users ...
user avatar
0 votes
1 answer
1k views

ModuleNotFoundError: No module named '_sqlite3'

Since today, after CS50 ide has changed, I am not being able to run Django applications. This is because of an error occuring with sqlite3: >>> import sqlite3 Traceback (most recent call last)...
user avatar
  • 992
0 votes
3 answers
170 views

accidentally imported data multiple times (pset7 houses)

I was testing the code out and ended up running "python import.py characters.csv" multiple times. Now when I go into sqlite3 and print out the data it's repeated itself 3 times over, once ...
user avatar
1 vote
1 answer
191 views

How do correct I correct the pylint(no-member) error I get in the Web Flight lesson

Class Flight(models.Model): origin = models.ForeignKey(Airport, on_delete=models.CASCADE, related_name="departure") destination = models.ForeignKey(Airport, on_delete=models.CASCADE, ...
user avatar
0 votes
1 answer
160 views

Finance Buy function: Error when trying to create shares table, 'unknown column "user_id" in foreign key definition'

I'm trying to create a shares table for the buy function and have tried multiple CREATE TABLE commands with no success. Most recently, I tried: CREATE TABLE IF NOT EXISTS 'shares' ('id' INTEGER ...
user avatar
0 votes
0 answers
116 views

Passing parameters to sqlite3 throws incorrect number of bindings error

Trying to rewrite my query for the finance webapp to use sqlite3 module without relying on cs50 module, and running into this error: "sqlite3.ProgrammingError: Incorrect number of bindings supplied. ...
user avatar
0 votes
1 answer
90 views

SQL3 SUM troubles

Trying to create a portfolio by selecting all transactions of given stock symbol, summing the shares (negative for "sell" actions) and then displaying only positions where the user_id fits && ...
user avatar
0 votes
1 answer
253 views

Finance Pset, SQL DB, db.execute troubles

Implementing the Buy route and running into difficulty with updating the DB...I've tested the rest of my code which all works, but whenever I use the two db.execute lines at the end of the code, I get ...
user avatar
0 votes
0 answers
22 views

Finance pset, application.py, app.route("/buy"), Insert statement gives a runtime error [duplicate]

I don't know what's wrong with this Insert statement. Insert the transaction process into the transaction table. rows = db.execute("INSERT INTO transaction(cust_id, share_symbol, share_name, ...
user avatar