This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author draghuram
Recipients draghuram, facundobatista, sharmila
Date 2007-10-18.20:43:19
SpamBayes Score 0.0029488662
Marked as misclassified No
Message-id <1192740200.57.0.746600647606.issue1290@psf.upfronthosting.co.za>
In-reply-to
Content
When I run the code in a script, I don't get the error.

***************
marvin:cpython$ python
Python 2.5 (r25:51908, Jan 24 2007, 12:48:15) 
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom as dom
>>> data = open('testdata.txt','r').read()
>>> mydom = dom.parseString(data)
>>> mydom.firstChild.childNodes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in
position 18: ordinal not in range(128)
>>> import sys
>>> sys.getdefaultencoding()
'ascii'

marvin:cpython$ python dom.py 
marvin:cpython$ 
***************

Can you try and see if you can run it from the script too?
History
Date User Action Args
2007-10-18 20:43:20draghuramsetspambayes_score: 0.00294887 -> 0.0029488662
recipients: + draghuram, facundobatista, sharmila
2007-10-18 20:43:20draghuramsetspambayes_score: 0.00294887 -> 0.00294887
messageid: <1192740200.57.0.746600647606.issue1290@psf.upfronthosting.co.za>
2007-10-18 20:43:20draghuramlinkissue1290 messages
2007-10-18 20:43:19draghuramcreate