Solvedpylint Problem with Flask-SQLAlchemy, cannot find valid and existing property in SQLAlchemy object.

Steps to reproduce

  1. Install Visual Studio Code
  2. Install python support and install pylint
  3. Setup basic flask app
  4. Create Blueprint and import db from main

Current behavior

severity: 'Error'
message: 'E1101:Instance of 'SQLAlchemy' has no 'Column' member'
at: '14,10'
source: 'pylint'
code: 'E1101'

Expected behavior

No errors (since code / application works as expected)

pylint --version output

No config file found, using default configuration
pylint 1.8.3,
astroid 1.6.2
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]

For more details check following thread:

29 Answers

✔️Accepted Answer

I find an elegant solution here:


pip install pylint-flask

Load the installed plugin.

For example, if you use VS code, please edit setting.json file as follows:

"python.linting.pylintArgs": ["--load-plugins", "pylint_flask"]

Other Answers:

@elamje : I wrote a small pylint plugin to fix these issues : pylint-flask-sqlalchemy if you want to try it.

For folks commenting here about switching to flake8, there are multiple solutions to this problem without waiting for a solution from pylint itself:

  • run it with --generated-members=Column
  • or maybe --ignored-classes=SQLAlchemy
  • or disable no-member locally where the error is emitted
  • or even disable it globally

Coming here and commenting that switching to flake8 is a solution to your problem means that you were never interested in the first place to fix it using what pylint offers you already.

And as I mentioned earlier, we don't support sqlalchemy out of the box. Understanding Python code is hard, understanding it when it uses metaclasses and/or other dynamic features is next to impossible, which exactly what is happening with sqlalchemy and flask_sqlalchemy.

Use pylint plugin pylint-flask-sqlalchemy

pip install pylint_flask_sqlalchemy

And in your settings.json of VisualCode

"python.linting.pylintArgs": ["--load-plugins", "pylint_flask_sqlalchemy"]

@YoungWilliamZ Is there a solution for newest flask? pylint-flask supports only flask.ext imports, and I don't have those

Related Issues:

pylint cv2 module members are not recognized
On VScode: CTRL + Shift + P Choose Preferences: Open Settings (JSON) Add this line into JSON file: p...
pylint logging-format-interpolation for f-strings
Please not! f-Strings are more readable and fast Pylint will warn against using .format and % when l...
pylint Problem with Flask-SQLAlchemy, cannot find valid and existing property in SQLAlchemy object.
I find an elegant solution here:
pylint --fail-under flag
@PCManticore @brycepg Please consider re-opening this This is a useful feature coverage also has sim...
pylint [Python 3.9] Value 'Optional' is unsubscriptable (unsubscriptable-object) (also Union)
Also encountering this with the Union type in Python 3.9:
pylint pylint exceed maximum recursion depth
I'm also seeing the behavior with pylint==2.6.0 & astroid==2.4.2. There are similar errors in bugtra...
ipython Last jedi release (0.18.0) is incompatible with ipython (7.19 and 7.18 tested); reason - column arg was deprecated, and now removed
As a temporary fix for anyone just trying to get things working again: It would be really nice if yo...
notebook execution error: doesn’t understand the “open location” message. (-1708)
(Solution at bottom!) So it seems that the problem is in the Python standard library ...
notebook juipiter notebook server "connecting to kernel" problem
Downgrading tornado to 4.5.3 fixed my problem with pip - sudo python3.6 -m pip install tornado==4.5....
notebook Kernal Error - FileNotFoundError: [WinError 2] The system cannot find the file specified
For anyone interested I found the solution: Open your Anaconda Prompt When I create a new env in Ana...
tqdm Jupyterlab and tqdm_notebook
I confirm this problem on my environment but it is upstream so IMHO nothing can be done on tqdm Plea...
ipython NameError: name 'sys' is not defined
Ok that was easy The Jedi release on 12/25 version 0.18.0 is breaking tab completion pip install --u...
notebook Cannot start jupyter notebook, DLL load failed
UPDATE w/ FIX: I fixed this problem by adding *anaconda root*/Library/bin to my PATH ...
scipy Unable to find imresize
I got this error even with pillow installed on scipy==1.3.0 I fixed it by installing an earlier vers...
notebook how to close running jupyter notebook servers?
Each server should start on a new port jupyter notebook list is reading a set of data files - each n...
notebook Installed package won't import in notebook
Check sys.executable and sys.path inside the notebook - I bet your kernel is not running in the envi...
notebook Crash when running jupyter notebook with a user with id != 1000
I had the same problem export XDG_RUNTIME_DIR= eliminated the problem. Apparently ...
notebook Kernel error win32api
Rumors abound there's an installation glitch in the 225 build of pywin32 Have you tried conda instal...
spyder Spyder Won't Launch
Could you run in a terminal and try again? Description of your problem What steps will reproduce the...
scipy Unable to install scipy on macOS Big Sur (Intel hardware)
Wow this worked Thank you: Install openblas: I used pip3 to install scipy Success!!!! ...
notebook Images in Markdown not showing when uploaded to Github
I spent some time figuring out what the problem with my image was I have used the below syntax to di...
ipython No module named shutil_get_terminal_size
Looks like you've installed IPython without getting its dependencies somehow Given that I see eggs ...
spyder [warn] kq_init: detected broken kqueue
Could you run in a terminal and try again? Description of your problem What steps will reproduce the...
spyder Mac OS spyder won't launch: directory mismatch
Please run to see if that helps. Problem Description Spyder won't launch ...
spyder Spyder crashes with segmentation fault on startup in Anaconda 4.5.0
Following a suggestion in #3326 I was able to work around the problem by doing This problem is also ...
notebook Jupyter notebook does not launch
Can you get an Anaconda command prompt and run jupyter notebook in it? It probably won't work but yo...
tqdm How to update single progress bar in multiprocessing map()
spyder qtpy.PythonQtError: No Qt bindings could be found
You need to install PyQt4 or PyQt5 because that's not installed automatically by pip For PyQt5 just ...
spyder “RuntimeError: This event loop is already running”; debugging aiohttp, asyncio and IDE “spyder3” in python 3.6.5
I got the issue resolved by using the nest_async pip install nest_asyncio and adding below lines in ...
notebook "not implemented" message with jupyter notebook under python-3.8.0a4 (due to switch to "proactor" loop on windows)
workaround from add this to tornado/platform/ after ...
notebook Kernel error in jupyter notebook
Try conda install pywin32 if you are using conda. ...
notebook Notebook suddenly started to ask for a password?
hello I have problems because jupyter notebook list doesn't show token :/ Can anyone help me with th...
notebook Autocomplete not working
This is a different issue It's essentially this issue: ipython/ipython#12740 As a temporary solution...
ipython ImportError: No module named shutil_get_terminal_size
@oschow this should work in general: Update from @Carreau : Reopening tagging 5.4 we should vendor s...
notebook how to read dataset from local computer file in jupyter notebook
Hi that is the right way to use pandas but it looks like you're using a relative path -- the ../ to ...
notebook Opera browser: Access to the file was denied after starting
I followed the following steps: I created the configuration file: jupyter notebook --generate-config...
scipy Not able to install scipy using pip in docker alpine image with python:3.5.6-alpine image
#Apologies for the delayed response As @rgommers stated scipy doesn't maintain a docker image rather...
spyder Getting "Spyder already running" warning when it's not
You need to look for a directory called .spyder2 in your Users\<your account> directory the find a f...
spyder Autocomplete is not working
@hepinjing could you remove enum and try again? Description In the last version of Anaconda 3 ...
spyder Spyder doesn't start - no module named 'PyQt5.QtWebEngineWidgets'
Actually you need to uninstall it first: pip uninstall pyqtwebengine pip install pyqtwebengine This ...
spyder Segmentation fault (core dumped) when trying to start conda-installed spyder 3.2.8
@addyblue Try conda install pyopengl Developer Note: *This issue is now resolved in Spyder >=3.3.0 T...
ipython pip install error
That's unrelated to IPython the issue comes from installing scandir you should see that with the sca...
notebook ( RuntimeWarning: coroutine 'WebSocketHandler.get' was never awaited
I got my notebook to connect by downgrading tornado from 6.0.0 to 5.1.1: Attempting to connect to a ...
notebook Markdown table alignment
It's one thing enforce right-alignment for consistency reasons as described in /pull/2534 ...
notebook NotImplemented Error Jupyter Notebook
Fixed by adding this code in python38/Lib/site-packages/tornado/platorm/ after the main me...
scipy Bug in L-BFGS-B minimize?
In fact if I start playing the guessing game Hi I think I found a bug Good news is that I think I kn...
notebook Jupyter Notebook won't start due to ports being already in use
On the system that it's running on jupyter notebook stop 8888 should work. Fresh install of anaconda...
notebook jupyter - Failed to start the kernel
I'd guess that you created the kernelspec for an environment which you've now deleted or removed ...
notebook Unable to create jupyter notebook
Then it looks like rm /home/ubuntu/.local/share/jupyter && mkdir /home/ubuntu/.local/share/jupyter s...
spyder spyder 3.2.8 crashes on launch with (clean conda install of) Python 3.6.5 on MacOS 10.12.6
The real solution is to run in Problem Description spyder on MacOS 10.12.6 with Python ...