Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-21 Thread Olav Peeters
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)


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 jct...@gmail.com:

On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-21 Thread Salvatore Larosa
Hi Olav,

2012/12/21 Olav Peeters opeet...@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 jct...@gmail.com:

 On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/qgis-**developerhttp://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt on freenode
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-21 Thread Olav Peeters

Hi Salvatore,
I'm on version 1.0.8 installed through the Python Plugin Installer.
I guess these latest changes on github have not yet made into the 
packaged version...

I will try again with sextante from source... tomorrow ;-)
Olav

On 22/12/12 00:16, Salvatore Larosa wrote:

Hi Olav,

2012/12/21 Olav Peeters opeet...@gmail.com mailto:opeet...@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 sextantewhen 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 jct...@gmail.com
mailto:jct...@gmail.com:

On Dec 19, 2012, at 2:49 AM, Victor Olaya
vola...@gmail.com mailto:vola...@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@lists.osgeo.org mailto:Qgis-developer@lists.osgeo.org
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


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-20 Thread John C. Tull
On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-20 Thread Victor Olaya
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 jct...@gmail.com:
 On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-20 Thread John C. Tull
Hi Victor,

Below are the outputs from my terminal. The error:library is a non-issue 
according to comments on the dev forum for saga.

Regards,
John


 which saga_cmd
 /usr/local/bin/saga_cmd
 saga_cmd
_
  #   ##   ###
 ### ###  ##   ###
  ###   # ## ##   # ##
   ### # ### #
# #   ##  # #   ##
_


error: library

library search path: /usr/local/lib/saga

58 available module libraries:
- climate_tools
- contrib_a_perego
- docs_html
- docs_pdf
- geostatistics_grid
- geostatistics_points
- geostatistics_regression
- grid_analysis
- grid_calculus
- grid_calculus_bsl
- grid_filter
- grid_gridding
- grid_spline
- grid_tools
- grid_visualisation
- ihacres
- imagery_classification
- imagery_rga
- imagery_segmentation
- imagery_svm
- imagery_tools
- io_esri_e00
- io_gdal
- io_gps
- io_grid
- io_grid_grib2
- io_grid_image
- io_odbc
- io_shapes
- io_shapes_dxf
- io_table
- lectures_introduction
- pj_georeference
- pj_proj4
- pointcloud_tools
- recreations_fractals
- recreations_games
- shapes_grid
- shapes_lines
- shapes_points
- shapes_polygons
- shapes_tools
- sim_cellular_automata
- sim_ecosystems_hugget
- sim_erosion
- sim_fire_spreading
- sim_hydrology
- ta_channels
- ta_compound
- ta_hydrology
- ta_lighting
- ta_morphometry
- ta_preprocessor
- ta_profiles
- table_calculus
- table_tools
- tin_tools
- transect

type -h or --help for further information

On Dec 20, 2012, at 2:09 PM, Victor Olaya vola...@gmail.com 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 jct...@gmail.com:
 On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-20 Thread Olav Peeters

I have the same output as John
Olav

On 21/12/12 00:16, John C. Tull wrote:

Hi Victor,

Below are the outputs from my terminal. The error:library is a non-issue 
according to comments on the dev forum for saga.

Regards,
John



which saga_cmd
/usr/local/bin/saga_cmd
saga_cmd

_
   #   ##   ###
  ### ###  ##   ###
   ###   # ## ##   # ##
### # ### #
# #   ##  # #   ##
_


error: library

library search path: /usr/local/lib/saga

58 available module libraries:
- climate_tools
- contrib_a_perego
- docs_html
- docs_pdf
- geostatistics_grid
- geostatistics_points
- geostatistics_regression
- grid_analysis
- grid_calculus
- grid_calculus_bsl
- grid_filter
- grid_gridding
- grid_spline
- grid_tools
- grid_visualisation
- ihacres
- imagery_classification
- imagery_rga
- imagery_segmentation
- imagery_svm
- imagery_tools
- io_esri_e00
- io_gdal
- io_gps
- io_grid
- io_grid_grib2
- io_grid_image
- io_odbc
- io_shapes
- io_shapes_dxf
- io_table
- lectures_introduction
- pj_georeference
- pj_proj4
- pointcloud_tools
- recreations_fractals
- recreations_games
- shapes_grid
- shapes_lines
- shapes_points
- shapes_polygons
- shapes_tools
- sim_cellular_automata
- sim_ecosystems_hugget
- sim_erosion
- sim_fire_spreading
- sim_hydrology
- ta_channels
- ta_compound
- ta_hydrology
- ta_lighting
- ta_morphometry
- ta_preprocessor
- ta_profiles
- table_calculus
- table_tools
- tin_tools
- transect

type -h or --help for further information

On Dec 20, 2012, at 2:09 PM, Victor Olaya vola...@gmail.com 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 jct...@gmail.com:

On Dec 19, 2012, at 2:49 AM, Victor Olaya vola...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] SAGA modules (version 2.1.0) through SEXTANTE on Mac OSX

2012-12-19 Thread Victor Olaya
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
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer