welovewordpress / SublimeHtmlTidy

Tidy, clean and prettify your HTML code with this plugin for Sublime Text 2
GNU General Public License v2.0
88 stars 15 forks source link

Error 255 #8

Closed adrian-em closed 12 years ago

adrian-em commented 12 years ago

On the execution of some html files I get the following error: There was an error calling the script at /home/aesptux/.config/sublime-text-2/Packages/HtmlTidy/tidy.php. Return value: 255

My PHP version:

php -v
PHP 5.3.10 (cli) (built: Feb  2 2012 22:12:16) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans
welovewordpress commented 12 years ago

Hi @aesptux and thanks for reporting this issue.

It seems that you are running Linux, correct? I haven't tested HtmlTidy on Linux but you are the first to report a bug there.

So, I'd like to ask you to do two things:

First, open the Sublime Console, try to run HtmlTidy and post the debug output from HtmlTidy here.

Second, try to find tidy on your system. Actually, all Linuxes (and Mac OS X) should come with tidy preinstalled at /usr/bin/tidy. Maybe somewhere else, but if you enter

which tidy

in a terminal, it should tell you, where tidy is on your system. If it's not installed, please try to install it - probably by doing something like apt-get install tidy, but I haven't checked that...

The error message you posted tells me, that HtmlTidy tried to run the php version of tidy. This is only used as a fallback if the native tidy executable cannot be found.

brunohq commented 12 years ago

I had the same issue on Linux. It happens that tidy was not preinstalled on my machine. I installed it and now everything is running smoothly.

Thanks

adrian-em commented 12 years ago

Console output: HtmlTidy: calling script: "/usr/bin/php" "/home/aesptux/.config/sublime-text-2/Packages/HtmlTidy/tidy.php" "/tmp/htmltidy-sublime-buffer.tmp" --tab-size=4 --wrap-attributes=0 --new-inline-tags='video,audio,canvas,source,embed,ruby,rt,rp,keygen,menu,command,time' --new-blocklevel-tags='section,header,footer,hgroup,nav,dialog,datalist,details,figcaption,figure,meter,output,progress' --break-before-br=0 --new-pre-tags='article,aside,summary,mark' --indent-attributes=0 --clean=0 HtmlTidy: script returned: 255 error: There was an error calling the script at /home/aesptux/.config/sublime-text-2/Packages/HtmlTidy/tidy.php. Return value: 255

Which tidy output:


which tidy; whereis tidy
/usr/bin/which: no tidy in (/usr/java/default/bin:/usr/java/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/aesptux/Documents/android-sdk-linux/tools:/home/aesptux/Documents/android-sdk-linux/platform-tools:/usr/bin/:/home/aesptux/.local/bin:/home/aesptux/bin:/home/aesptux/Documents/android-sdk-linux/tools:/home/aesptux/Documents/android-sdk-linux/platform-tools:/usr/bin/)
tidy:

So, as @brunohq also said, I didn't have tidy installed. I installed it (I'm running Fedora 16) and everything is working fine now.

Thank you all, I close the issue as it is solved now.