Cant open saved files...

General discussion on BeerTools Pro Software.
paintbomb
Light Lager
Light Lager
Posts: 19
Joined: Wed Feb 21, 2007 3:48 pm

Cant open saved files...

Post by paintbomb »

Every time I save a file I cant open it later. I get the error mesage saying invalid XML file etc. This is not on certain recipes, but all of them. I have heard of people having this problem and sending the effected files to Beer Tools to get fixed, but I dont want to have to send in every file I ever save. The files all have the btp file extension.

I believe I have read that there is some line of code that gets messed up in the XML, does anyone know what the fix is for this? Is there going to be a patch put out? I have seen this problem come up quite a few times.

thanks
User avatar
jeff
Imperial Stout
Imperial Stout
Posts: 1602
Joined: Sun Jan 09, 2000 8:16 pm
Location: Hollywood, SC
Contact:

Re: Cant open saved files...

Post by jeff »

paintbomb wrote:Every time I save a file I cant open it later. I get the error mesage saying invalid XML file etc. This is not on certain recipes, but all of them. I have heard of people having this problem and sending the effected files to Beer Tools to get fixed, but I dont want to have to send in every file I ever save. The files all have the btp file extension.

I believe I have read that there is some line of code that gets messed up in the XML, does anyone know what the fix is for this? Is there going to be a patch put out? I have seen this problem come up quite a few times.

thanks
I can take a look at the files if you would like. My guess is that a junk character made it into the notes section. If you want me to look at them you can email them to me.
Jeff
BeerTools.com Staff
Joe028
Light Lager
Light Lager
Posts: 10
Joined: Fri Dec 15, 2006 4:11 pm

Post by Joe028 »

I had this problem as well. If its the same as what was going on with me, do what Jeff says. Just open the file with msword and show the paragraph marks. Look in the notes section at the very bottom, chances are a character is in there that doesn't belong and just delete it. Mine was an arrow line return character. Another thing to do is open it in firefox. That directed me exactly to the error. I realize a fix needs to be made, but that allowed me to at least open them when I needed.
paintbomb
Light Lager
Light Lager
Posts: 19
Joined: Wed Feb 21, 2007 3:48 pm

Post by paintbomb »

Joe028 wrote:I had this problem as well. If its the same as what was going on with me, do what Jeff says. Just open the file with msword and show the paragraph marks. Look in the notes section at the very bottom, chances are a character is in there that doesn't belong and just delete it. Mine was an arrow line return character. Another thing to do is open it in firefox. That directed me exactly to the error. I realize a fix needs to be made, but that allowed me to at least open them when I needed.
Awesome that fixed me right up. It seems that at the end of lines it adds those extra characters... the boxes. once deleted the files open perfectly. thanks for the help.

This seems like it should be an easy fix for the programmers... but with computers, even the simplest tasks can be challenging.
just-cj
Double IPA
Double IPA
Posts: 168
Joined: Wed Jun 06, 2001 7:36 pm
Location: Numazu, Japan

Post by just-cj »

Are you using the latest version? If not, download it (right now it's v20) and that might already take care of the problem.
mpaniagua
Light Lager
Light Lager
Posts: 25
Joined: Fri Nov 10, 2006 1:26 pm

Post by mpaniagua »

same here. In my case, the character was a diamond on the <Name></Name> tag, after the text name. The name was 'Belgian Pale Ale'

I'm using ver 1.0.28 on Mac. Deleted the character and now it loads alright.

Cheers!
rpoelking
Light Lager
Light Lager
Posts: 14
Joined: Mon Nov 06, 2006 11:55 am
Location: Cleveland, Ohio

Invalid XML File

Post by rpoelking »

Jeff,

I get this a LOT. I just rebuild one of my recipes and saved it over the weekend and today it won't open.

Is this a platform specific issue perhaps? I think it's worth looking into.
rpoelking
Light Lager
Light Lager
Posts: 14
Joined: Mon Nov 06, 2006 11:55 am
Location: Cleveland, Ohio

Invalid XML File

Post by rpoelking »

I see what the problem is. It's in some of the descriptions of the ingredients database. In my case there was invalid character in my rice syrup solids description just before the word "provides."
User avatar
billvelek
Imperial Stout
Imperial Stout
Posts: 801
Joined: Fri Mar 05, 2004 9:44 am
Location: Arkansas, USA
Contact:

How and why is this happening?

Post by billvelek »

How and why is this happening? I mean, how are the 'junk' characters, which are apparently not needed nor intended, getting into the files in the first place? Is it because folks are pasting something from another program? And even if that is the case, can't a filter be set up within BTP to either eliminate those characters or ignore them? I haven't had the problem yet, but if I ever do I probably won't remember the advice in this thread and I'll be upset.

Cheers.

Bill Velek
Visit www.tinyurl.com/bvelek - portal to my brewing sites: 3,100+ members on 'Grow-Hops', and 1,350+ brewers on my 'BrewingEquip' group.
Running BTP v1.5.3 on WinXP 2005 SP3 w/AMD Athlon 64@3800+, 1GigRam, Res 1024x768
User avatar
jeff
Imperial Stout
Imperial Stout
Posts: 1602
Joined: Sun Jan 09, 2000 8:16 pm
Location: Hollywood, SC
Contact:

Re: Invalid XML File

Post by jeff »

rpoelking wrote:I see what the problem is. It's in some of the descriptions of the ingredients database. In my case there was invalid character in my rice syrup solids description just before the word "provides."
Opening "invalid" files in FireFox will often reveal where the offending character is. .btp files are XML, and FireFox can open them. Did rice syrup solids come from the website or the internal BTP DB?
Jeff
BeerTools.com Staff
rpoelking
Light Lager
Light Lager
Posts: 14
Joined: Mon Nov 06, 2006 11:55 am
Location: Cleveland, Ohio

Post by rpoelking »

I don't recall. I want to say it's from the internal DB.
User avatar
jeff
Imperial Stout
Imperial Stout
Posts: 1602
Joined: Sun Jan 09, 2000 8:16 pm
Location: Hollywood, SC
Contact:

Post by jeff »

rpoelking wrote:I don't recall. I want to say it's from the internal DB.
I have looked in both the internal DB and the site DB and I can't find any ingredients named "Rice Syrup Solids". Are you sure you didn't enter that ingredient yourself, or perhaps received it as part of a recipe file from a friend?
Jeff
BeerTools.com Staff
rpoelking
Light Lager
Light Lager
Posts: 14
Joined: Mon Nov 06, 2006 11:55 am
Location: Cleveland, Ohio

Post by rpoelking »

Then it was my own. I think I got the values from you and entered them myself. Strange though.
User avatar
Trent
Posts: 1
Joined: Wed Jan 23, 2008 2:54 pm

Same Problem

Post by Trent »

Hey,
I am having the same problem with btp not opening my files shortly after creating them. I have been able to open them fine for a while and just hit save. Now they dont work. Jeff, I emailed them to you as an attachment hoping you can help me, I dont know how to fix html or whatever.
thanks a lot
Trent
"Beer is proof that God loves us, and wants us to be happy." Ben Franklin
User avatar
jeff
Imperial Stout
Imperial Stout
Posts: 1602
Joined: Sun Jan 09, 2000 8:16 pm
Location: Hollywood, SC
Contact:

How BTP handles non-ascii characters

Post by jeff »

The .btp file format saves all recipe data including ingredients, equipment, schedule, etc. Even if an ingredient exists in the DB, BTP still saves all of the data for that ingredient in the recipe file. This makes it easy to share recipes with others even if they have different items in their DB. But it also means that changing an ingredient in the DB will have no effect on any recipe files that use that ingredient. Neither will changing an ingredient in a recipe file have any effect on the DB. Even though we have cleaned the data in the DB that is distributed with BTP, some recipe files may contain characters that make the XML validation check fail.

BTP uses encoding called "quoted-printable" to save text in .btp recipe files. The encoding converts non-ascii characters into ascii "phrases" using special markup. When read back in, the markup is used to convert the characters back to their original form. The advantage to this encoding is that it preserves the readability of the text while rendering non-ascii characters XML safe.

Invalid BTP files have been very rare since the encoding has been implemented. As suggested above, using FireFox to find invalid characters that may foul up a file is a great way to fix files. When the location of a bad character is found, using a simple text editor to remove the character is fast and easy. Just be careful to use a text editor that will not try to write the file as .rtf or .doc. The file should be saved as plain text with the .btp file extension. Just in case, it is always best to save a copy of the original file as a backup.

For files that are really stubborn and just don't seem to be repairable, you may send the file to me and I have not yet had a file that I could not fix.
Jeff
BeerTools.com Staff
Post Reply