Sublime Forum

PHP Beautifier error

#1

Hello, I found Sublime Package Control.
Then installed PHP Beautifier.
But the choice of Format: PHP
error occurs in the console:

Traceback (most recent call last): File ".\sublime_plugin.py", line 350, in run_ File ".\php_beautifier.py", line 14, in run File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 2]

how to fix it?
Sublime Text 2 Beta is 2181
ubuntu 12.04 x32
Windows 7 x32

0 Likes

#2

I’ve got the exact same problem…

I’m using Windows 7 64-bits.

0 Likes

#3

Did you read github.com/SublimeText/PhpBeaut … stallation ?
It requires a tool to be present on your $PATH and I think you don’t have it installed.

0 Likes

#4

I had the same issue. To solve it just replace the line 13 at php_beautifier.py with:
cmd = “php_beautifier.bat”

That solved my problem, because the actual command is installed by pear in windows as php_beautifier.bat

cheers

0 Likes

#5

changed to cmd = “php_beautifier.bat” , but there was an error:

File ".\sublime_plugin.py", line 362, in run_ return self.run(edit) File ".\php_beautifier.py", line 19, in run File ".\php_beautifier.py", line 34, in fixup File ".\encodings\utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode byte 0xad in position 14: unexpected code byte

0 Likes