[Qgis-developer] Mapserver Exporter Bug?

Tim Sutton tim at linfiniti.com
Wed May 28 16:01:19 EDT 2008


Hi

I didnt see any other reply to this message so I had a look, but it  
kooks like your change is already in trunk now.

Regards

Tim
Em May 27, 2008, às 7:42 PM, Mauricio de Paulo escreveu:

> Hi everybody,
> I was working with mapserver exporter and ran into a problem with  
> the error
> message at the end of this mail.
> After a little debug i found out that the code was passing a  
> QString instead
> of a python string when reading the filename from the dialog. This  
> is a
> regular source of bug as some classes don't understand QStrings  
> very well,
> even though they do work a lot like python strings.
> After the change on mapserverexport.py on line 81:
> exporter = Qgis2Map(str(self.dlg.ui.txtQgisFilePath.text()),
> str(self.dlg.ui.txtMapFilePath.text()))
>
> I don't know exactly if only my python and pyqt versions require  
> this but it
> fixed the problem for me. I think it's a good idea to NEVER work with
> QString, just with python strings for compatibility purposes.
>
> versions:
> Python 2.5.2
> PyQt4.QtCore.qVersion() '4.3.4'
> qgis 0.10.0
> Ubuntu 8.10
>
> Thanks for the good work with Mapserver Export Plugin. I've been  
> working with
> it for 2 years now and it fills a great gap in the mapfile production.
>
> Maurício de Paulo
>
> An error has occured while executing Python code:
> Traceback (most recent call last):
>  File "/home/vatto/.qgis//python/plugins/mapserver_export/ 
> mapserverexport.py",
> line 81, in run
>   exporter = Qgis2Map(self.dlg.ui.txtQgisFilePath.text(),
> self.dlg.ui.txtMapFilePath.text())
>  File "/home/vatto/.qgis//python/plugins/mapserver_export/ 
> ms_export.py", line
> 37, in __init__
>   self.qgs = minidom.parse(projectFile)
>  File "/usr/lib/python2.5/xml/dom/minidom.py", line 1915, in parse
>   return expatbuilder.parse(file)
>  File "/usr/lib/python2.5/xml/dom/expatbuilder.py", line 928, in parse
>   result = builder.parseFile(file)
>  File "/usr/lib/python2.5/xml/dom/expatbuilder.py", line 204, in  
> parseFile
>   buffer = file.read(16*1024)
> AttributeError: read
>
> W
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

Tim Sutton
QGIS Project Steering Committee Member - Release Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological  
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list