Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Pylint Error on Python 3.7 import command

Been trying to use Pylint 1.9.2 with Python 3.7 and Flask 1.0.2 in visual studio code 1.25,

I keep getting the following error on Pylint on the first line of my code.

F0002:: generator raised StopIteration

{
"resource": "/d:/social network/models.py",
"owner": "python",
"code": "F0002",
"severity": 8,
"message": "F0002:<class 'RuntimeError'>: generator raised StopIteration",
"source": "pylint",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}

I have no clue at all what is the cause of this error as it seems.

  1. appear regardless of the content of my code(I tried "import datetime" and from peewee import *, both have the same error)

  2. only appear in one file of the whole project. other files have module importation but see no errors of this one.

Please help if you have any idea what is causing this error!

Thank you!

like image 408
Richard Li Avatar asked Jan 19 '26 11:01

Richard Li


1 Answers

PyLint 1.9.2 does not support Python 3.7. Python 3.7 support is available from their preview release, which you can obtain with

pip install pylint astroid --pre -U
like image 112
Patrick Haugh Avatar answered Jan 21 '26 02:01

Patrick Haugh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!