AttributeError on Windows 10
theXYZT opened this issue · 2 comments
theXYZT commented
I am trying to use the PyYAPF Python Formatter (version 0.15.0) with Sublime Text 3 (3.2.2, Build 3211) on Windows 10 and it doesn't work.
Here's the log from the console:
PyYapf: Encoding is 'UTF-8'
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 1088, in run_
return self.run(edit)
File "C:\Users\XYZT\AppData\Roaming\Sublime Text 3\Installed Packages\PyYapf Python Formatter.sublime-package\PyYapf.py", line 489, in run
File "C:\Users\XYZT\AppData\Roaming\Sublime Text 3\Installed Packages\PyYapf Python Formatter.sublime-package\PyYapf.py", line 168, in __enter__
File "./python3.3/shlex.py", line 276, in split
File "./python3.3/shlex.py", line 266, in __next__
File "./python3.3/shlex.py", line 93, in get_token
File "./python3.3/shlex.py", line 121, in read_token
AttributeError: 'NoneType' object has no attribute 'read'
These are the Python and Yapf versions:
>python --version
Python 3.8.5
>yapf --version
yapf 0.30.0
I don't have any custom User settings.
When I went digging, the "python3.3" folder is empty and does not have a file called "shlex.py". It's unclear why that reference to the file even exists since shlex
is part of the standard python library.
jason-kane commented
I think this is it failing to find yapf; I have a win10 laptop I can try it
on.
…On Mon, Aug 31, 2020 at 4:04 PM Nikhil Mahajan ***@***.***> wrote:
I am trying to use the PyYAPF Python Formatter (version 0.15.0) with
Sublime Text 3 (3.2.2, Build 3211) on Windows 10 and it doesn't work.
Here's the log from the console:
PyYapf: Encoding is 'UTF-8'
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 1088, in run_
return self.run(edit)
File "C:\Users\Nikhil\AppData\Roaming\Sublime Text 3\Installed Packages\PyYapf Python Formatter.sublime-package\PyYapf.py", line 489, in run
File "C:\Users\Nikhil\AppData\Roaming\Sublime Text 3\Installed Packages\PyYapf Python Formatter.sublime-package\PyYapf.py", line 168, in __enter__
File "./python3.3/shlex.py", line 276, in split
File "./python3.3/shlex.py", line 266, in __next__
File "./python3.3/shlex.py", line 93, in get_token
File "./python3.3/shlex.py", line 121, in read_token
AttributeError: 'NoneType' object has no attribute 'read'
These are the Python and Yapf versions:
>python --version
Python 3.8.5
>yapf --version
yapf 0.30.0
I don't have any custom User settings.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAORY6E6AHSE3GMCYQD7MKLSDQT6BANCNFSM4QRBAZPA>
.
theXYZT commented
I think this is it failing to find yapf
Hmm, I wonder why. Yapf is available on the PATH and I haven't had any problems with this for the last couple of years on the same system. This started recently.