[Qgis-user] Mapserver Export

Richard Duivenvoorde richard at duif.net
Thu Feb 14 14:35:57 PST 2008


Hi Yves,
I've been trying out some other things later, and got the same error. It 
appears I've two versions of the plugin installed. One in (the newer 
plugin directory) ~/.qgis/python/plugins and one in the 'old' 
installation directory: /usr/share/qgis/python/plugins ...
After removing both and loading the 0.1 version (apparently the last), I 
had your same error again....
But if you take a look in the plugin code file ms_export.py, you see a line:
self.qgs = minidom.parse("/home/gsherman/test1.qgs")
if you change that to:
self.qgs = minidom.parse(str(projectFile))
things start working :-)

Shapefile mapfiles are nice to do, I've got postgis errors when trying 
postgis maps (missing 'using unique' and 'using srid' stuff), and it's 
not very fault tolerant yet, but ... it's a work in progress ... 
Generated mapfiles are easy to fix. It's a nice way to do quick and 
dirty class generation.

Good luck

Richard

Yves Jacolin wrote:
> Hi,
> 
> I am using the trunk version (1-2 weeks old) of QGIS and the plugin is the 0.1 
> (not sure as I am not in my office). I will try to install again the plugin 
> tomorrow.
> 
> Thanks :)
> 
> Y.
> Le jeudi 14 février 2008 21:31, Richard Duivenvoorde a écrit :
>> Hi Jacolin,
>>
>> what versions (both qgis and plugin) are you using? I know this was an
>> 'old' error in the mapserver plugin of gary...
>> I just installed the plugin fresh via the python plugin installer in
>> qgis 9.2 here (ubuntu), and it's working. So I presume it is fixed and
>> you could try to load a new version of it?
>> (you can always download the plugin direct via:
>> http://spatialserver.net/pyqgis/plugins/mapserver_export.zip and unpack
>> it in ~/.qgis/python /plugins directory).
>>
>> Grtz Richard Duivenvoorde
>>
>> Jacolin Yves wrote:
>>> Hi,
>>>
>>> I have a problem with the mapserver export plugin, I get an error:
>>> self.dlg.ui.txtMapFilePath.text())
>>>  File
>>> "/home/yjacolin/.qgis//python/plugins/mapserver_export/ms_export.py",
>>> line 37, in __init__
>>>   self.qgs = minidom.parse("/home/gsherman/test1.qgs")
>>>  File "/usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py", line
>>> 1915, in parse
>>>   return expatbuilder.parse(file)
>>>  File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py",
>>> line 924, in parse
>>>   fp = open(file, 'rb')
>>> IOError: [Errno 2] Aucun fichier ou répertoire de ce
>>> type: '/home/gsherman/test1.qgs'
>>>
>>> Indeed, in my python file, l.37:
>>> self.qgs = minidom.parse("/home/gsherman/test1.qgs")
>>>
>>> How can I change this line to use the plugin ?
>>>
>>> Thanks,
>>>
>>> Y.
> 



More information about the Qgis-user mailing list