LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-17-2016, 07:40 AM   #1
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100
Blog Entries: 1

Rep: Reputation: 21
Question HTML Tidy quits with error message


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.
 
Old 08-17-2016, 11:55 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
Given that you upgraded Xubuntu, and that this may be to blame, have you tried reinstalling Bluefish and HTML Tidy in Xubuntu 16.04?

Interestingly, exit code 0 should mean that Tidy completed successfully.
 
Old 08-17-2016, 12:55 PM   #3
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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.
 
Old 08-17-2016, 01:09 PM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
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.
 
Old 08-17-2016, 02:12 PM   #5
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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.
 
Old 08-17-2016, 02:32 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
Good, that's narrowed it down. . In the Bluefish preferences for external filters, what do you have listed for the command line call to Tidy?
 
Old 08-17-2016, 03:52 PM   #7
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
Under External Filters in Bluefish, to call up Tidy, I have:

|tidy -utf8 -i|
 
Old 08-17-2016, 05:40 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
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
 
Old 08-17-2016, 06:17 PM   #9
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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.
 
Old 08-18-2016, 08:49 AM   #10
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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?
 
Old 08-18-2016, 09:23 AM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
--write-qe - seriously? That doesn't even exist.

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.
 
Old 08-18-2016, 09:28 AM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
Quote:
Originally Posted by whitshade View Post
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).
 
Old 08-18-2016, 10:09 AM   #13
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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'|.
 
Old 08-18-2016, 10:28 AM   #14
whitshade
Member
 
Registered: Sep 2003
Location: New Hampshire
Distribution: Xubuntu 16.04
Posts: 100

Original Poster
Blog Entries: 1

Rep: Reputation: 21
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.

At least the error codes are consistent.
 
Old 08-18-2016, 11:46 AM   #15
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
Quote:
Originally Posted by whitshade View Post
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 View Post
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thunderbird quits when sending new message lauriej Linux - Desktop 4 10-04-2010 06:17 AM
Konqueror 3.4.2 (SuSE 10.0) no HTML and error message. tiddy Linux - Software 1 06-17-2006 09:42 AM
DISCUSSION: Tidy Up With HTML Tidy jeremy LinuxAnswers Discussion 0 10-10-2005 08:25 PM
HTML Tidy and PHP 4 atom Programming 0 10-01-2004 11:06 AM
Mozilla Firefox quits when visiting certain sites, no error message given nimcha Linux - Software 4 05-20-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration