Hola amigos!<br><br>tengo un problema, que luego de varias horas no he podido solucionar:<br><br>El problema es como sigue:<br><br>estoy haciendo una aplicación que parsea paginas web usando la libreria libxml2dom.<br>el directorio de la app es asi:<br>
MAP/<br> core/<br> __init__.py<br> libxml2dom/<br> map.py<br> ui/<br> __init__.py<br> etc, etc<br><br>en map.py tengo algunas clases y al principio del modulo hago el import<br>
import libxml2dom<br><br>y en una funcion (de una de las clases dentro de map.py) tengo:<br><br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">def html_to_dom(self, page):</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> dom = libxml2dom.parseString(page, html=1)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> return dom</p><br>Ahora, cuando ejecuto la aplicación me tira este error:<br><br>"
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">AttributeError: 'module' object has no attribute 'parseString'</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">"<br></p><br>Sin embargo en libxml2dom/__init__.py <br>existe una funcion parseString :P<br><br>Que será? yo tengo instalado libxml2 y python-libxml2<br>
<br>Gracias por su ayuda!<br><br>PD. A mi me da la impresión de que tengo un problema con el import, que esta importando otra cosa<br>que se llama igual pero no tiene el atributo, pero no me imagino como...<br clear="all">
<br>-- <br>Gabriel Fernández<br>Desrrollador Web<br><a href="http://www.openweb.com.uy" target="_blank">www.openweb.com.uy</a> <br><img src="http://www.openweb.com.uy/imagenes/logo-OPENWEB.jpg" height="39" width="420"><br>
<br>