Raghuram Devarakonda added the comment:

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?

----------
nosy: +draghuram

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1290>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to