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

from .async import check_async ^ SyntaxError: invalid syntax

Open afsneto opened this issue 7 years ago • 11 comments

Traceback (most recent call last): File "C:\Users\AlcidesNeto.atom\packages\linter-pylama\bin\pylama.py", line 12, in from pylama.main import shell File "C:\Users\AlcidesNeto.atom\packages\linter-pylama\bin\pylama\main.py", line 10 from .async import check_async ^ SyntaxError: invalid syntax

afsneto avatar Nov 03 '18 00:11 afsneto

Do you use Python >= 3.7?

gmist avatar Nov 03 '18 00:11 gmist

I have this issue as well, and my python version is 3.7.1 .

Nandha95 avatar Nov 08 '18 05:11 Nandha95

Works fine after reverting back to Python 3.6

Nandha95 avatar Nov 28 '18 06:11 Nandha95

As of python 3.7, async became a reserved keyword, more info here.

Issue is the relative import of bin/pylama/async.py in bin/pylama/main.py. The easy fix would be to rename async.py to something else and updating the import statement in main.py. Perhaps async_worker.py?

SuperOxigen avatar Jan 24 '19 23:01 SuperOxigen

Have same issue, using Python 3.7.1

Mrzhangxd avatar Feb 13 '19 13:02 Mrzhangxd

I fixed the problem by installing pylava and using it as external option, as discussed in #100.

claudiodsf avatar Feb 13 '19 13:02 claudiodsf

Same issue with Python 3.7.3

ghost avatar Apr 26 '19 04:04 ghost

This issue is caused by the bundled version of pylama being quite out of date.

You can either:

  • Follow #112 for updates on getting the bundled version of pylama to work with Python 3.7+
  • Go into the settings and change to using the "External" version of pylama, making sure that you have installed it on your system of course

I personally use the second option as you aren't tied down to the out of date bundled version.

Arcanemagus avatar Apr 26 '19 18:04 Arcanemagus

Second option is way better! thanks @Arcanemagus

Folks before changing pylama settings to "External". Go to cmd and pip install pylama.

Ciao!

bxmoreira avatar May 02 '20 01:05 bxmoreira

Screenshot_1 it works

lcoi avatar Aug 10 '21 11:08 lcoi

image

with Python 3.10.0 works.

ilubnon avatar Oct 14 '21 20:10 ilubnon