Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > gnosis XML objectify

Reply
Thread Tools

gnosis XML objectify

 
 
Wang, Harry
Guest
Posts: n/a
 
      11-26-2007
The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.

Harry

 
Reply With Quote
 
 
 
 
kyosohma@gmail.com
Guest
Posts: n/a
 
      11-26-2007
On Nov 26, 1:46 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
> The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.
>
> Harry


When does this happen? When you import the module? When you pass it
some xml? Do you have a full traceback?

Mike
 
Reply With Quote
 
 
 
 
Sébastien Boisgérault
Guest
Posts: n/a
 
      11-26-2007
On Nov 26, 8:46 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
> The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.
>
> Harry


Could you show us a simple example that exhibits this behavior
please ?

SB
 
Reply With Quote
 
Wang, Harry
Guest
Posts: n/a
 
      11-26-2007
Full Traceback enclosed:

Test Suite Started @ 2007-11-26 11:34:46.617000
Traceback (most recent call last):
File "C:\UDR2\UDRxmlGateway.py", line 370, in <module>
ParseAll()
File "C:\UDR2\UDRxmlGateway.py", line 286, in ParseAll
py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make _instance()
File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 160, in make_instance
o = self.ParseFile(self._fh)
File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 190, in ParseFile
self._myparser.ParseFile(file)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 68, column 0

Harry C. Wang
Sr. Test Engineer (Automation)
AOL Mobile
Phone 206 - 268 - 7502
temporary e-mail: http://www.velocityreviews.com/forums/(E-Mail Removed)
Personal e-mail: (E-Mail Removed)

________________________________

From: python-list-bounces+hwang=(E-Mail Removed) on behalf of (E-Mail Removed)
Sent: Mon 11/26/2007 12:19 PM
To: (E-Mail Removed)
Subject: Re: gnosis XML objectify



On Nov 26, 1:46 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
> The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.
>
> Harry


When does this happen? When you import the module? When you pass it
some xml? Do you have a full traceback?

Mike
--
http://mail.python.org/mailman/listinfo/python-list


 
Reply With Quote
 
Wang, Harry
Guest
Posts: n/a
 
      11-26-2007
I can't tell where in the XML file it throws the error.

Here is the snippet of the Python code:
def ParseAll():
py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make _instance()

Harry C. Wang
Sr. Test Engineer (Automation)
AOL Mobile
Phone 206 - 268 - 7502
temporary e-mail: (E-Mail Removed)
Personal e-mail: (E-Mail Removed)

________________________________

From: python-list-bounces+hwang=(E-Mail Removed) on behalf of Sébastien Boisgérault
Sent: Mon 11/26/2007 12:21 PM
To: (E-Mail Removed)
Subject: Re: gnosis XML objectify



On Nov 26, 8:46 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
> The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.
>
> Harry


Could you show us a simple example that exhibits this behavior
please ?

SB
--
http://mail.python.org/mailman/listinfo/python-list


 
Reply With Quote
 
kyosohma@gmail.com
Guest
Posts: n/a
 
      11-26-2007
On Nov 26, 2:33 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
> Full Traceback enclosed:
>
> Test Suite Started @ 2007-11-26 11:34:46.617000
> Traceback (most recent call last):
> File "C:\UDR2\UDRxmlGateway.py", line 370, in <module>
> ParseAll()
> File "C:\UDR2\UDRxmlGateway.py", line 286, in ParseAll
> py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make _instance()
> File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 160, in make_instance
> o = self.ParseFile(self._fh)
> File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 190, in ParseFile
> self._myparser.ParseFile(file)
> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 68, column 0
>
> Harry C. Wang
> Sr. Test Engineer (Automation)
> AOL Mobile
> Phone 206 - 268 - 7502
> temporary e-mail: (E-Mail Removed)
> Personal e-mail: (E-Mail Removed)
>
> ________________________________
>
> From: python-list-bounces+hwang=(E-Mail Removed) on behalf of (E-Mail Removed)
> Sent: Mon 11/26/2007 12:19 PM
> To: (E-Mail Removed)
> Subject: Re: gnosis XML objectify
>
> On Nov 26, 1:46 pm, "Wang, Harry" <(E-Mail Removed)> wrote:
>
> > The gnosis xml libs should not be version specific, but when I try to use Python 2.5, I am getting "not well formed (invalid token)" errors.

>
> > Harry

>
> When does this happen? When you import the module? When you pass it
> some xml? Do you have a full traceback?
>
> Mike
> --http://mail.python.org/mailman/listinfo/python-list


Googling the error seems to indicate that the problem may be an
encoding issue. Check the following threads:

http://www.mail-archive.com/kid-temp.../msg00787.html
http://article.gmane.org/gmane.comp.python.devel/90093
http://mail.python.org/pipermail/pyt...ly/450288.html

Mike
 
Reply With Quote
 
Stefan Behnel
Guest
Posts: n/a
 
      11-27-2007
Wang, Harry wrote:
> Test Suite Started @ 2007-11-26 11:34:46.617000
> Traceback (most recent call last):
> File "C:\UDR2\UDRxmlGateway.py", line 370, in <module>
> ParseAll()
> File "C:\UDR2\UDRxmlGateway.py", line 286, in ParseAll
> py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make _instance()
> File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 160, in make_instance
> o = self.ParseFile(self._fh)
> File "C:\python25\Lib\site-packages\gnosis\xml\objectify\_objectify.py", line 190, in ParseFile
> self._myparser.ParseFile(file)
> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 68, column 0


You XML input is broken. This is not a gnosis problem.

Look at line 68 in your XML file.

Stefan
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gnosis XML objectify Wang, Harry Python 0 11-26-2007 09:04 PM
newb: lxml objectify johnny Python 0 03-30-2007 08:36 PM
Article on updates to gnosis.xml.objectify David Mertz, Ph.D. Python 0 12-04-2004 10:38 PM
[Announce] Gnosis Utils 1.1.0 (update) David Mertz, Ph.D. Python 0 07-16-2003 09:22 PM
What's new with Gnosis David Mertz Python 3 07-13-2003 01:47 PM



Advertisments