Hi gang,

I wanted to play around with NSXMLDocument a bit, and figured PyObjC would be a good way to do it.  Unfortunately, I get strange errors.

>>> doc, error = Foundation.NSXMLDocument.alloc ().initWithContentsOfURL_options_error_(u"asdfkjsda.svg", 0)
2005-11-10 11:03:20.618 python[1018] *** -[OC_PythonUnicode absoluteURL]: selector not recognized [self = 0x370db0]
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: NSInvalidArgumentException - *** -[OC_PythonUnicode absoluteURL]: selector not recognized [self = 0x370db0]

Note that the "asdfkjsda.svg" file is in the same directory where I started python.  I tried using a file URL instead, but both " file://asdfkjsda.svg" and "file:///Users/jnutting/Documents/svg/shapes/asdfkjsda.svg" give me the same result, as does wrapping the string in unicode(string, 'utf-8') instead of just prepending it with 'u'.

Running framework python 2.4.1, mac os 10.4.3, PyObjC 1.3.7 (from the installer package for 2.4.1/10.3; is it odd that there's not a 1.3.7 for 2.4.1/10.4, or should the one I've got work OK?)

--
// jack
// http://www.nuthole.com
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to