[Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX
Salvatore Larosa
lrssvtml at gmail.com
Fri Dec 21 15:16:14 PST 2012
Hi Olav,
2012/12/21 Olav Peeters <opeeters at gmail.com>
> A quick and dirty circumvention of the check is to change line 373 in
> ~/.qgis/python/plugins/**sextante/saga/SagaAlgorithm.py
> to:
> if "" in line:
> (restart Qgis)
>
> this way the modules do open since the check is basically disabled.
> The original code should also though. Maybe it's encoding related.
> When I execute a Saga module, this happens during saving the output:
>
> An error has occured while executing Python code:
>
> Traceback (most recent call last):
> File "/Users/myaccount/.qgis//**python/plugins/sextante/gui/**OutputSelectionPanel.py",
> line 95, in saveToFile
> self.text.setText(str(**filename))
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in
> position 2: ordinal not in range(128)
>
>
are you using the latest sextante version ? From your traceback it seem not.
line 95 [1] has been changed !
Unfortunately, that's an annoying error that affects several tools (much
less now) in sextante when non-ascii chars are used !
Regards,
-SL
[1] -
https://github.com/qgis/Quantum-GIS/blob/master/python/plugins/sextante/gui/OutputSelectionPanel.py#L95
> Should I have compiled with a different locale set?
>
> We are nearly there :-)
>
> Olav
>
>
>
> On 20/12/12 23:09, Victor Olaya wrote:
>
>> There is actually the following check in the case of mac and linux:
>>
>> command = ["saga_cmd"]
>> proc = subprocess.Popen(command, shell=True,
>> stdout=subprocess.PIPE,
>> stdin=subprocess.PIPE,stderr=**subprocess.STDOUT,
>> universal_newlines=True).**stdout
>> for line in iter(proc.readline, ""):
>> if "________" in line:
>> settings.setValue(SAGA_**INSTALLED, True)
>> return
>> return "It seems that SAGA is not correctly installed in
>> your system.\nPlease install it before running SAGA algorithms."
>>
>> basically, it is a naive check to see if executing saga_cmd in a
>> console returns something that looks like the SAGA CMD header. It
>> works fin in linux, but it seems it is not working in Mac. Are you
>> sure saga is in your path? if so, what do you see when you execute
>> saga_cmd? maybe the header is different for some reason?
>>
>> Thanks in advance!
>>
>> 2012/12/20 John C. Tull <jctull at gmail.com>:
>>
>>> On Dec 19, 2012, at 2:49 AM, Victor Olaya <volayaf at gmail.com> wrote:
>>>
>>> Olav,
>>>>
>>>> Thanks for your contribution!
>>>>
>>>> There is no option "SAGA folder" in the SEXTANTE configuration like
>>>>> you have
>>>>> when installing on Windows. I haven't checked on Linux, but I guess the
>>>>> Unixes don't need this, as long as saga_cmd is in the path, right?
>>>>>
>>>> Right, Mac and Linux should work in the same way. Let me check,
>>>> because maybe in Mac it is performing the same check as in windows
>>>> (that is, checking that the SAGA folder is set...)
>>>>
>>>> Looks like an easy to solve problem...i hope
>>>>
>>>> Will keep you posted
>>>>
>>>> Thanks again!
>>>>
>>>>
>>>> Victor
>>>>
>>> It looks like I'm a little late to the party on this. I confirm the
>>> same. I look forward to a solution on this for OS X. We can work on grass,
>>> perhaps, once that is resolved.
>>>
>>> Regards,
>>> John
>>>
>>>
> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt on freenode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121222/dc8dfc8d/attachment.html>
More information about the Qgis-developer
mailing list