3

I'm working on the project1 from cs50web course.

Getting the following problem using flask and SQLAlchemy: "Instance of 'scoped_session' has no 'execute' memberpylint(no-member)".

I use Ubuntu 18.04, Flask. I suppose that the problem is somehow related to SQLAlchemy libarary or some adjustments should be done to the confiquration files.

How can I fix this problem?

enter image description here

5

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: https://stackoverflow.com/questions/42789666/pylint-error-message-on-cloud-9-cs50

| improve this answer | |
0

this helped me Instance of 'scoped_session' has no 'commit' member

enter image description here

| improve this answer | |
0

You need to import from flask_sqlalchemy import SQLAlchemy

and then create a instance of it by writing db = sqlalchemy(app)

This way

enter image description here

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .