Invalid Character


#1

My PTI gives me an Unhandled exception when it gets to reading my Items from Peachtree. I’ve looked at the Details and I don’t know which item it is freaking out on. Is there anyway to see exactly which item it is not liking?

Thanks!

[Forum Note: See the Common Issues & Messages in the PTI 5 Help file at [b]http://www.ayanova.com/PTI5webhelp/common_issues__messages.htm[/b][b]for solution to this issue if you encounter it

or in newer versions of PTI, refer to your version of PTI online Help section labeled Common Issues & Messages)
][/b]


#2

Hi

When you get the error, click on the Details button and copy all of the text, and paste all of it into your topic reply.

And confirm - this error occurs when it shows that PTI is reading the PeachTree Items?

  • Joyce

#3

Hi, Joyce.

Yes, it dies at the same point everytime and it is when it is retrieving Items. See below for the information you requested:

Thanks!

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Xml.XmlException: Invalid character in the given encoding. Line 967, position 70.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)
at System.Xml.XmlTextReaderImpl.ReadData()
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.Xmldocument.Load(XmlReader reader)
at System.Xml.Xmldocument.Load(String filename)
at AyaNovaPTI.Util.1()
at AyaNovaPTI.Util.PopulatePTListCache()
at AyaNovaPTI.Util.PreFlightCheck()
at AyaNovaPTI.MainForm.2()
at AyaNovaPTI.MainForm.(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: [file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll](file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll)

AyaNovaPTI
Assembly Version: 3.7.0.0
Win32 Version: 3.7.0.0
CodeBase: [file:///C:/Program%20Files/Ground%20Zero%20Tech-Works%20Inc/AyaNova%203/AyaNovaPTI.exe](file:///C:/Program%20Files/Ground%20Zero%20Tech-Works%20Inc/AyaNova%203/AyaNovaPTI.exe)


#4

Thank you for posting the information.

The key part of the error is Invalid character in the given encoding. Line 967, position 70.

I would suggest that because you get this error while PTI is loading the PeachTree items, confirm that none of your PeachTree Items have special characters in their names or other fields in the Item entry screen.

If they do, edit, and than try loading PTI again - does it now load? Note if the Line and position numbers change as if they do that means that you edited one but may have others that need editing

Let me know.

  • Joyce

#5

Hi again

I thought I had seen this error before but it wasn’t coming up in any support emails or elsewhere on the forum, but Iwaspretty sure I had seen it somewhere- if you review the PTI Help file’s Common Issues & Messages section, the third or fourth issue down (depending on what version youhave)provides a screenshot and example of this same error.

The solution listed is as posted above, if the issue occured while loading of items it is because one or more PeachTree partsare using a non-English character. For example, Cárdenas (note the ascent on the á) and although you may have been able to enter them into PeachTree, when exporting or importing using xml PeachTree will not recognize any characters other than English.

You need to go through your PeachTree items and make sure none of them are using special characters in any of their fields (name, street, etc), save and than run PTI again.

  • Joyce

#6

Joyce,

Yeah, I came to all the same conclusions you have by going through the manual. I knew it was supposedly an invalid char, per my thread topic. However, my conundrum is that we have about 1000 items listed in Peachtree and a cursory examination of the item names have yielded no non-english characters. Without having to dig through the item descriptions of over 1000 items, is there no way to see which item is causing the problem during the import process? PTI pulls from an xml, correct? Where is this xml located so I can go to the line and object it refers to?

Thanks!


#7

Hi

Sorry, no, PTI 3 doesn’t keep the PeachTreeitems xml file to be able to identify which specific PeachTree item is the issue.

A suggestion with PTI 3 is to perform an PeachTree export of your inventory items to a CSV file so that you can manually view all of the fields at once to see which are using special characters.

Do note that development will be looking into having the item xml file available when PTI v4 is run via the C:\Documents and Settings\yourname\Local Settings\Temp We are working to releasing the new AyaNova 4 and its version 4 optional add-ons this week

  • Joyce

#8

[Forum Note: if using a newer version of AyaNova and PTI, of course do not download and isntall this older version]

Hi again

If using PTI 3.7.0.0:

  • Close out of PTI
    -Download 3.7.1AyaNovaPTI.zip (note - removed as latest version for 3 is 3.6)
    -Use WinZip to extract
    -Overwrite the existing AyaNovaPTI.exe file
    -Now run PTI

It will still give you the same error, but now you will find the PTitems.xml file in C:\Documents and Settings\yourname\Local Settings\Temp folder

And in some cases, if you open using Internet Explorer, it may tell you right off the bat which item is at fault with the special character. Otherwise, use it to browse through to find the special character(s)

Also note that AyaNova 4 was released today.

  • Joyce

#9

Hi again

I wanted to post back the information I received from PeachTree about this, as we contacted them to let them know thatwe are not be able to read an XML file exported from Peachtree if the file has special characters (i.e. á, é, í, ó, ú, etc).

We received a reply that they have put it on their list of issues to correct in a future version PeachTree. They realize that you are able to enter special characters into PeachTree, but the PeachTree export/import itself can not handle it.

An ETA or what version it will be fixed in was not provided. At this time, to be able to use PTI, special characters in PeachTree items/clients/vendors must be removed because of this issue with Peachtree itself .

  • Joyce