Attribute error DTD


#1

Hi,

i am trying to compile gnuradio on my Suse 11.1 PC.
For compiling and i am using my normal user .
For i am using the user .

I downloaded and installed SDCC from Source.
Then i downloaded and compiled the gnuradio source from the branch.

The compilation goes right, but when i try to execute :
Traceback (most recent call last):
File “/usr/local/bin/grc”, line 45, in
ActionHandler(args, Platform())
File
“/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms/python
/Platform.py”, line 61, in init
generator=Generator,
File “/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms
/base/Platform.py”, line 63, in init
self._load_blocks(os.path.join(dirpath, filename))
File “/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms
/base/Platform.py”, line 74, in _load_blocks
try: ParseXML.validate_dtd(f, self._block_dtd)
File
“/usr/local/lib/python2.6/site-packages/gnuradio/grc/utils/ParseXML.py”,
line 42, in validate_dtd
dtd = etree.DTD(dtd_file)
AttributeError: ‘module’ object has no attribute ‘DTD’

And when i execute <usrp_probe>:
Traceback (most recent call last):
File “/usr/local/bin/usrp_probe”, line 31, in
platform = Platform(block_paths_internal_only=[‘usrp_probe.xml’])
File
“/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms/python
/Platform.py”, line 61, in init
generator=Generator,
File “/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms
/base/Platform.py”, line 59, in init
if os.path.isfile(block_path): self._load_blocks(block_path)
File “/usr/local/lib/python2.6/site-packages/gnuradio/grc/platforms
/base/Platform.py”, line 74, in _load_blocks
try: ParseXML.validate_dtd(f, self._block_dtd)
File
“/usr/local/lib/python2.6/site-packages/gnuradio/grc/utils/ParseXML.py”,
line 42, in validate_dtd
dtd = etree.DTD(dtd_file)
AttributeError: ‘module’ object has no attribute ‘DTD’

Any Idea?

Regards Markus


#2

feldmaus <feldmann_markus gmx.de> writes:

AttributeError: ‘module’ object has no attribute ‘DTD’
There seems to be a Problem with this Fie <ParseXML.py>.
The attribute doesn’t exist.

However, how can i download the last gnuradio Software, which
doesn’t contains the <ParseXML.py> File with NOT the MD5SUM:
cde9a3b94aae26b87571416a1aa413ca (Broken ParseXML.py)

Regards Markus


#3

feldmaus wrote am 2009-02-04 14:38:

feldmaus <feldmann_markus gmx.de> writes:

AttributeError: ‘module’ object has no attribute ‘DTD’
There seems to be a Problem with this Fie <ParseXML.py>.
The attribute doesn’t exist.

Which version of source and tools are you using?
Do you have an stable release or are you using a version from the CVS
repository?
What system do you compile on?
Are you sure that all your Python modules are up to date?

Have you checked all READMEs and the mail archives?
What did your favorite web search engine answer to your questions?
What did you do to solve the problem on your own?

Give good and comprehensive information and do your homework, and you’ll
get good and comprehensive help.

If not sure, have a look at “How To Ask Questions The Smart Way”[1]

Patrick

[1] http://www.catb.org/~esr/faqs/smart-questions.html

Engineers motto: cheap, good, fast: choose any two
Patrick S.
Student of Telematik, Techn. University Graz, Austria


#4

Josh B. <josh joshknows.com> writes:

package manager (yast2?) or run this commmand:
python -c “from lxml import etree;print etree.LXML_VERSION”
Thank you that was the Problem. The Package is <python-lxml(1.1.2)>
do not have the DTD, but <python-lxml(2.0.5)> has it.

I added many Repositories, but the priority of the repository
is also important. Maybe you have a a older package in a repository
with a lower/higher priority than the repository with the newer package,
that was my problem.

I solved this by upgrade all upgradeable packages.

The


#5

There is a problem with the installed version of python-lxml package. My
machine has lxml version 2.1.1. The latest version of lxml is 2.1.5
(http://codespeak.net/lxml/index.html#download).

Perhaps you have a very old version of lxml that is missing some feature
(in this case DTD). Install the latest lxml from the website, or see if
your package manager has an update available.

For the record, what version of lxml do you have? Either check your
package manager (yast2?) or run this commmand:
python -c “from lxml import etree;print etree.LXML_VERSION”

-Josh