Questions tagged [postgresql]

The tag has no usage guidance.

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

How to use a PostgreSQL database using python CS50 library's SQL function?

I wanted to use the CS50 library's SQL function for interacting with a PostgreSQL database. I have installed PostgreSQL on my computer and removed the need for passwords by modifying the .../Program ...
0
votes
0answers
19 views

Join table seems showing an error

I tried this statement on the adminer postgreSql database online database query tool and works but when i try to code it into my FLASK app showing nothing. lists = db.execute("SELECT b.isbn,b.author,...
0
votes
1answer
89 views

postgresql syntax error

So this is part of the import.py code in project1: db.execute("INSERT INTO books (isbn, title, author, year) VALUES (:isbn, :title, :author, :year)", {"isbn": isbn, "title": title,...
0
votes
1answer
64 views

Problem in importing from csv file

I am currently trying to import the contents of the books.csv file into my PostgreSQL database on Adminer. Here's my code: import csv import os from sqlalchemy import create_engine from sqlalchemy....
0
votes
2answers
175 views

adminer.cs50.net giving “Session expired, please login again.” error when attempting to login

This seems to have happened 11 Sept 2019 but it is occurring again. I tried logging into Adminer today and am receiving this error: "Session expired, please login again." I thought my Heroku ...
0
votes
1answer
17 views

How to return a value while calculating between two columns from the same table in postgresql?

I'm trying to write a SQL query for Postgresql where I'm subtracting a value of a column in a row with that of another row in the same table and returning the result. I can use IS NULL in SQL, and ...
0
votes
1answer
74 views

Unsure of what my DATABASE_URL is

I am using windows 10 (64-bit) and am following the course "Web Programming with python and Javascript" in CS50, in which i wanted to use my computer as a local host to store the table content. I am ...
0
votes
0answers
23 views

AttributeError: 'NoneType' object has no attribute '__instantiate_plugins'

I'm getting this error in running in my local computer the source code of the airline1 in the lecture3. I have changed the DATABASE_URL to postgresql://postgres:password@localhost:3000/airlines. What ...
0
votes
1answer
447 views

error while trying to update database using python and sqlalchemy

While I was trying to run create.py file having the following code: import os from flask import Flask, render_template, request from models import * app = Flask(__name__) app.config["...
0
votes
1answer
126 views

CS50 Web Programming: Lecture 3 (SQL)- import.py won't work for me

I'm trying to run the same code for import.py from the lecture, but am running into trouble. import.py: import csv import os from sqlalchemy import create_engine from sqlalchemy.orm import ...
0
votes
3answers
546 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
3k views

Issue with psycopg2 dependency - pg_config executable not found on Mac OS

For Project 1: When running "pip3 install -r requirements.txt" for the initial setup, I get an issue with the psycopg2 dependency: Error: pg_config executable not found. pg_config is required to ...
0
votes
1answer
631 views

AttributeError: __enter__

I defined a table in python using sqlalchemy but when i try to create it this error appears
0
votes
1answer
404 views

SQL SELECT query for multiple word search

I'm working through project 1 in the CS50 Web Programming course. I have created a search form which is just one text box in the middle of the page where the user can type in the ISBN number, the ...
7
votes
7answers
4k views

CS50w - list.py - AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

I'm trying to run the list.py code on my Ubuntu machine, but I'm getting the following error: AttributeError: 'NoneType' object has no attribute '_instantiate_plugins' I looked at this post and it ...