Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently upgraded to Xubuntu 16.04 and now HTML Tidy is not working correctly. Since the upgrade, whenever I validate my HTML using Tidy (via Bluefish), it returns the following error message:
The command "tidy -qe '/home/chris/Website/somesite.com/somefile.html' exited with error code 0.
When I try to use Tidy to clean up a Web page in Bluefish, I get a similar error.
Thanks for taking the time to read this. Any input is welcome.
Thanks for the response, hydrurga. Reinstallation occurred to me, but I was distracted from it by the encroaching horror of grocery shopping. I just tried both a regular uninstall and a purge for both Bluefish and Tidy. I still get the same message. I concur that it's intriguing that the output of 0 means that the page passed validation. On that note, I deliberately added an extra tag to a page and Tidy identified the errors but also teturned this error: The command tidy -qe '/tmp/bluefish/bf-0' exited with error code 256. The /tmp/bluefish directory does not contain a bf-0 file or directory. I don't know if this has anything to do with my problem.
Ok. Have you tried running Tidy outside Bluefish? That could shine some light on whether we should be looking more at Tidy or Bluefish for the solution.
This I haven't tried, until now. I ran Tidy from the terminal and had it do a few minor tweaks to a given web page (first made tags upper case, then indented and formatted the text to UTF-8). This worked fine. So logic would dictate that the problem is with Bluefish. Thanks for this suggestion, hydrurga.
Right, I decided to install Tidy and Bluefish on a test rig (Linux Mint 18 64-bit Cinnamon).
What a pfaff it was to get something working. From what I can see, if there are any warnings or errors then Tidy under Bluefish will always display the "exited with error code 256" modal window, even though it may have generated the tidied file.
As a minimum, changing Tidy's command line in the Bluefish preferences to |tidy --write-back yes| will ensure that the file is modified in place (and you can decide whether or not to save the changes - save the file before running Tidy and then check to see if there is a * before the filename in Bluefish which indicates that the file was changed by the call to Tidy). The html file that I was using as a test file required two run throughs with Tidy under Bluefish before no further changes were made and no error message was displayed.
I would suggest that you try |tidy --write-back yes| to see if that works for you.
Which leads me to a question. Why if Tidy is set in your preferences to issue |tidy -utf8 -i|, did your subsequent error message say that Tidy had produced an error on tidy -qe? There's definitely something awry there.
Just so we can synchronise, I'm using Bluefish 2.2.7-2 and Tidy 20091223cvs-1.5 on the test rig.
Last edited by hydrurga; 08-17-2016 at 05:50 PM.
Reason: extraneous option
Tidy's output of "tidy -qe had me baffled. It worked fine before, indentng tags as I like (a little OCD there). I'm using that version of Bluefish. Thanks for going through this for me. It is pain to set this up, but was worse when I was using Slack. I'll try your suggestion and get back to you. Thanks again, hydrurga.
After changing the tidy filter command to |tidy --writeback yes|, Bluefish returned with a pop-up window stating
The command tidy --write-back yes exited with error code 256.
The seond time, it returned
line 18 column 1 - warning: <table> lacks "summary" attribute.
The command tidy --write-qe exited with error code 256.
The top line is the kind of return that I would expect from Tidy in this case. Once again, I don't know where the "tdy -qe" command come from. It's also interesting that I've never seen the 256 error code before, at least when no errors are found.
When I tried to "clean up" the code on my test page, Tidy returned with a pop-up window stating
Command returned error code
The command tidy --write-back yes exited with error code 256.
Could it be that this issue is the result of upgrades to either Tidy or Bluefish or both?
Are you sure there are no other Tidy entries in the Bluefish external filters, or even a Tidy entry in its external commands list?
If Bluefish/Tidy worked with the same input HTML file before you upgraded and now it doesn't, then it could well be an upgrade in the packages that caused it. However the version of Tidy we're using has been around for a fair while so in that case the likely culprit would be Bluefish.
Before we do anything else, can you point me at an HTML page on the web that produces the strange -qe error output and I'll run Tidy on my rig (which, being Mint 18, is based on Ubuntu 16.04) and see if I get the same result.
For info, HTML Tidy is breathing new life here: http://www.html-tidy.org/ . It appears however that for the moment you would need to build from source code to install it on your machine, unless someone has set up a PPA somewhere.
When I tried to "clean up" the code on my test page, Tidy returned with a pop-up window stating
Command returned error code
The command tidy --write-back yes exited with error code 256.
That is also the behaviour I've been experiencing. It appears to indicate that at least one warning or error message was produced. However the tidying process may well have still taken place and the tidied output produced - you need to check whether the file has been modified in-situ by the operation (see one of my previous posts).
I maximized the Preferences widow in Bluefish and under and scrolled over to the far right. Under Tidy HTML Validator (or, more accurately, across from) under the Command column, I found the following command for tidy:
|tidy -qe '%i'|
This is clearly the source of that message. I changed the above to
|tidy --write-back yes|
and run the Tidy filter. This opened a pop-up window with this message:
Command returned error code
The command tidy --write-back yes exited with error code 256.
In regards to indications that Tidy has changed the page in question, the page title on the tab representing the page turns blue and Tidy inserts its own generator tag.
When I tried to validate the code using Tidy, I received the following error via pop-up:
Failed to create a command
Failed to create a command for |tidy --write-back yes| '%i'|.
I just tried a clean install. I uninstalled Bluefish and renamed its directory in my account .bluefish.bak. I then reinstalled Bluefish. I ran validation and got this message:
The command "tidy -qe '/home/chris/Website/somesite.com/somefile.html' exited with error code 256.
The Tidy filer displayed a pop-up window stating:
Command returned error code
The command tidy -utf8 exited with error code 256.
It does add the Tidy generator tag to the code, however.
I maximized the Preferences widow in Bluefish and under and scrolled over to the far right. Under Tidy HTML Validator (or, more accurately, across from) under the Command column, I found the following command for tidy:
|tidy -qe '%i'|
This is clearly the source of that message. I changed the above to
|tidy --write-back yes|
and run the Tidy filter. This opened a pop-up window with this message:
Command returned error code
The command tidy --write-back yes exited with error code 256.
In regards to indications that Tidy has changed the page in question, the page title on the tab representing the page turns blue and Tidy inserts its own generator tag.
This is as it should be as far as I can see. The error message is annoying but Tidy still works. Getting rid of that error message will be a separate task.
Quote:
Originally Posted by whitshade
When I tried to validate the code using Tidy, I received the following error via pop-up:
Failed to create a command
Failed to create a command for |tidy --write-back yes| '%i'|.
This I don't understand. How is this action, validating the code, different from what you've just attempted which was effectively validating the code? Also, the '%i'| bit shouldn't be there - are you sure you edited Bluefish's Tidy filter correctly and didn't leave an extraneous '%i'| on the end of the command?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.