jlegewie / Py2to3

Sublime Text 3 Plugin: Translate Python 2 to 3
2 stars 0 forks source link

[Bug] FileNotFoundError: [WinError 2] The system cannot find the file specified #1

Open Kristinita opened 7 years ago

Kristinita commented 7 years ago

1. Summary

I can't run your package in Sublime Text 3.

2. Settings

My Sasha3.py file:

print "Кристина Легендарна!"

3. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

I install Sublime Py2To3 → I restart Sublime Text → I open Sasha3.pyCtrl+Shift+P (⌘⇧p for Mac) → Python2To3: Translate Python 2 To 3.

4. Expected behavior

If I run 2to3 in terminal, file successful convert for me.

D:\Киролайна\Тестовые файлы>2to3 -w Sasha3.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored Sasha3.py
--- Sasha3.py   (original)
+++ Sasha3.py   (refactored)
@@ -1 +1 @@
-print "Кристина Легендарна!"
+print("Кристина Легендарна!")
RefactoringTool: Files that were modified:
RefactoringTool: Sasha3.py

5. Actual behavior

command: py2to3

Traceback (most recent call last):
  File "./python3.3/subprocess.py", line 1104, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Sublime Text 3 x64\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "D:\Sublime Text 3 x64\Data\Packages\Py2to3\Py2to3.py", line 19, in run
    p = subprocess.Popen(['2to3', '-w', path], stdout=PIPE, stderr=PIPE)
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1110, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

6. Environment

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126 Python: 3.6.1 Package: I use the latest stable version of this package for Sublime Text 3

Thanks.

diVineProportion commented 5 years ago

p = subprocess.Popen(['2to3', '-w', path], stdout=PIPE, stderr=PIPE)

I'm guessing that you don't have 2to3 installed or in the windows path?