linter-flake8 icon indicating copy to clipboard operation
linter-flake8 copied to clipboard

I updated linter-flake8 and I get an error each time I use atom

Open miketheknight12 opened this issue 6 years ago • 8 comments

screen shot 2019-01-15 at 9 25 00 pm

please help me :(

miketheknight12 avatar Jan 16 '19 02:01 miketheknight12

It looks like you probably updated Python at the same time. That error comes from using Python 3.7.x with the (older) version of pycodestyle bundled with the released version of flake8. You can try making sure you are on the latest version of flake8, but from what I know you will need to downgrade to Python 3.6.x for now.

Arcanemagus avatar Jan 16 '19 09:01 Arcanemagus

@Arcanemagus they are all up to date. How do I downgrade python in terminal?

miketheknight12 avatar Jan 16 '19 16:01 miketheknight12

From the bit of the errors I can see in your Console there it looks like you are running macOS, which unfortunately means you'll have to look elsewhere for detailed help with that.

Arcanemagus avatar Jan 16 '19 16:01 Arcanemagus

@Arcanemagus ok, I appreciate the help.

miketheknight12 avatar Jan 16 '19 17:01 miketheknight12

Just as a sanity check, you do see the same errors when running flake8 in Terminal?

Arcanemagus avatar Jan 16 '19 17:01 Arcanemagus

@Arcanemagus yes i believe so /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1 EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')

miketheknight12 avatar Jan 16 '19 17:01 miketheknight12

@Arcanemagus v1020-wn-181-216:~ michael$ flake8 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1 EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydocstyle/parser.py", line 326, in parse compile(src, filename, 'exec') File "./Desktop/intro.py", line 42 return new_function() ^ SyntaxError: 'return' outside function

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar return list(map(*args)) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/checker.py", line 682, in _run_checks return checker.run_checks() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/checker.py", line 612, in run_checks self.run_ast_checks() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/checker.py", line 520, in run_ast_checks for (line_number, offset, text, check) in runner: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8_docstrings.py", line 89, in run for error in self._check_source(): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8_docstrings.py", line 78, in _check_source ignore_decorators=None, File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydocstyle/checker.py", line 64, in check_source module = parse(StringIO(source), filename) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydocstyle/parser.py", line 340, in call return self.parse(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydocstyle/parser.py", line 328, in parse six.raise_from(ParseError(), error) File "", line 3, in raise_from pydocstyle.parser.ParseError: Cannot parse file. """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/flake8", line 11, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/main/cli.py", line 16, in main app.run(argv) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/main/application.py", line 412, in run self._run(argv) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/main/application.py", line 400, in _run self.run_checks() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/main/application.py", line 318, in run_checks self.file_checker_manager.run() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/checker.py", line 338, in run self.run_parallel() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flake8/checker.py", line 302, in run_parallel for ret in pool_map: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 354, in return (item for chunk in result for item in chunk) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 748, in next raise value pydocstyle.parser.ParseError: Cannot parse file.

miketheknight12 avatar Jan 16 '19 17:01 miketheknight12

Yep, you'll have to figure out how to downgrade to 3.6 if you don't need 3.7 right now, most likely through however you installed 3.7.

Arcanemagus avatar Jan 16 '19 17:01 Arcanemagus