[
https://issues.apache.org/jira/browse/QPID-2524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906311#comment-15906311
]
ASF subversion and git services commented on QPID-2524:
-------------------------------------------------------
Commit 0c7e96af4e540df26372f8e4dd2f7f1b0a997ffd in qpid-python's branch
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-python.git;h=0c7e96a ]
QPID-2524: Always use the file:// prefix
> Fails loading dtd in Python 2.6 on Ubuntu 9.10 (Karmic) with "ValueError:
> unknown url type: /.../specs/amqp.0-10.dtd"
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-2524
> URL: https://issues.apache.org/jira/browse/QPID-2524
> Project: Qpid
> Issue Type: Bug
> Components: Python Client
> Affects Versions: 0.6
> Environment: Ubuntu 9.10 (Karmic)
> Python 2.6
> Qpid 0.6 (and trunk)
> Reporter: Greg Gaughan
> Assignee: Justin Ross
> Priority: Critical
> Labels: dtd, patch, python
> Fix For: qpid-python-1.37.0
>
> Attachments: remove-check-for-py23-r965557.diff
>
>
> In Python 2.6, importing qpid raises "ValueError: unknown url type:
> /.../specs/amqp.0-10.dtd"
> File "/usr/lib/python2.6/dist-packages/_xmlplus/sax/expatreader.py", line
> 109, in parse
> xmlreader.IncrementalParser.parse(self, source)
> File "/usr/lib/python2.6/dist-packages/_xmlplus/sax/xmlreader.py", line
> 123, in parse
> self.feed(buffer)
> File "/usr/lib/python2.6/dist-packages/_xmlplus/sax/expatreader.py", line
> 216, in feed
> self._parser.Parse(data, isFinal)
> File "/usr/lib/python2.6/dist-packages/_xmlplus/sax/expatreader.py", line
> 396, in external_entity_ref
> "")
> File "/usr/lib/python2.6/dist-packages/_xmlplus/sax/saxutils.py", line 523,
> in prepare_input_source
> f = urllib2.urlopen(source.getSystemId())
> File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen
> return _opener.open(url, data, timeout)
> File "/usr/lib/python2.6/urllib2.py", line 381, in open
> protocol = req.get_type()
> File "/usr/lib/python2.6/urllib2.py", line 242, in get_type
> raise ValueError, "unknown url type: %s" % self.__original
> This didn't happen in Python 2.5 (on Ubuntu 8.10 at least). The xml.sax
> routines use urlopen which cannot handle the filename (at least without a
> file:// prefix).
> Reversing r656301 fixes this by always prefixing the filename with file://
> (not just for Python 2.3). I'm not sure if this would fix it for all
> releases/versions though.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]