[issue25253] AttributeError: 'Weather' object has no attribute 'dom'

Xiang Zhang report at bugs.python.org
Mon Sep 28 08:48:24 CEST 2015


Xiang Zhang added the comment:

I don't think this is a bug of Python. You should check your own
application to make sure you are parsing the right XML.

I run your code with the old uri and get the same traceback. The
cause is you are using xml parser to parse a html document which
is error prone, since the api is out-of-date and return a html
document.

I don't know what happens about the new api since I have no KEY
and can not do the experiment. But from the api you give,
what you will retrieve is a json. Surly parse it with a xml parse
leads to error and the attribute dom won't be created.

----------
nosy: +xiang.zhang

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25253>
_______________________________________


More information about the Python-bugs-list mailing list