6 votes

Instance of 'scoped_session' has no 'commit' member

They are warnings from pylint. You can tell pylint to ignore that error by create file .pylintrc in your folder with contains: ignored-classes=SQLObject,Registrant,scoped_session reference link: ...
user avatar
  • 61
3 votes

Web CS50 Project 1: 'flask.cli.NoAppException' flask app with sqlalchemy

Try to delete the following code in line 17. Session(app) At least it works for me in Mac.
user avatar
1 vote
Accepted

Difference between { var } vs :var as placeholder - SQL, Postgre

Especially from a security point of view, do not use f-strings (or similar measures) for building your SQL query, you might risk SQL injections. The placeholders in the query ensure the value is ...
user avatar
  • 20.7k
1 vote

What are the challenges when setting up your dev enviroment for Project 1 (MacOS)?

Here are the stumbling blocks I faced: SQLAlchemy Dependencey Issues: Postgres path not set I have written about this in another question (see link), but in a nutshell you need to add the path to ...
user avatar
1 vote
Accepted

Finance: Update SQL Data: db.execute

If you don't use bound variables with the CS50 sql module, sqlite will read num_sell as a column name, thus the "no such column" error. You need to use bound variables ostensibly to prevent sql ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible