[GRASS-user] r.futures not working

Anna Petrášová kratochanna at gmail.com
Fri Dec 11 11:42:25 PST 2020


On Fri, Dec 11, 2020 at 10:01 AM Tom Hackbarth <txhackbarth at gmail.com>
wrote:

> Dear Anna,
>
> yes I set the path right and this is the answer I get when running Rscript:
>
> Rscript
> Usage: /path/to/Rscript [--options] [-e expr [-e expr2 ...] | file] [args]
>
> --options accepted are
>   --help              Print usage and exit
>   --version           Print version and exit
>   --verbose           Print information on progress
>   --default-packages=list
>                       Where 'list' is a comma-separated set
>                         of package names, or 'NULL'
> or options to R, in addition to --no-echo --no-restore, such as
>   --save              Do save workspace at the end of the session
>   --no-environ        Don't read the site and user environment files
>   --no-site-file      Don't read the site-wide Rprofile
>   --no-init-file      Don't read the user R profile
>   --restore           Do restore previously saved objects at startup
>   --vanilla           Combine --no-save, --no-restore, --no-site-file
>                         --no-init-file and --no-environ
>
> 'file' may contain spaces but not shell metacharacters
> Expressions (one or more '-e <expr>') may be used *instead* of 'file'
> See also  ?Rscript  from within R
>
> So I guess it is working properly?
>

Yes, it looks good, is r.futures.potential still not working? Is the error
the same?


>
> Am Fr., 11. Dez. 2020 um 15:35 Uhr schrieb Anna Petrášová <
> kratochanna at gmail.com>:
>
>> Hi Tom,
>>
>> please keep the conversation on the mailing list.
>>
>> The problem in the GUI is unrelated, you can always type in the attribute
>> column if it doesn't show up.
>>
>> With running Rscript I mean typing 'Rscript' into the (black) terminal
>> and pressing enter. If the system can find it, it will try to run it and
>> you would get a message with Rscript parameters. When you tried to run the
>> PATH command, have you adjusted it with the path to your R installation?
>>
>> On Fri, Dec 11, 2020 at 6:02 AM Tom Hackbarth <txhackbarth at gmail.com>
>> wrote:
>>
>>> Hi Anna,
>>>
>>> I used the set PATH=%PATH%;C:\Program Files\R\R-3.5.0\bin code you
>>> mentioned. It is not working. I still do not understand how to run Rscript
>>> in the terminal to try out whether it has worked or not.
>>>
>>> I just wonder whether it is not the r.futures model that is not working.
>>> When I try to use it, I cannot select any layers for developed_column or
>>> subregions_column, as you can see in the picture attached. This is the
>>> first time I have encountered this problem within grass.
>>>
>>> Can you maybe try if it is working on your computer? I tried it now on
>>> windows, linux manjaro and mac and I get the same error.
>>>
>>> Thank you so much for your support.
>>>
>>>
>>> Best regards
>>>
>>> Tom
>>> [image: image.png]
>>>
>>> Am Fr., 11. Dez. 2020 um 10:21 Uhr schrieb Tom Hackbarth <
>>> txhackbarth at gmail.com>:
>>>
>>>> Hi Anna,
>>>>
>>>> can you tell me how I can run Rscript in the terminal?
>>>>
>>>>
>>>> Best regards
>>>>
>>>> Tom
>>>>
>>>> Am Do., 10. Dez. 2020 um 17:10 Uhr schrieb Anna Petrášová <
>>>> kratochanna at gmail.com>:
>>>>
>>>>> Hi Tom,
>>>>>
>>>>> On Thu, Dec 10, 2020 at 4:24 AM Tom Hackbarth <txhackbarth at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Anna,
>>>>>>
>>>>>> thanks for your answer.
>>>>>>
>>>>>> I reinstalled it already multiple times. I get the same error message
>>>>>> every time though. I will try it on a mac tomorrow, but that is the last
>>>>>> idea I have. Has there ever been a problem like this using r.futures? It's
>>>>>> such a shame because I really want to use it for my Master's Thesis as it
>>>>>> is capable of all the things that I need to do for it, but I cannot get
>>>>>> it to work.
>>>>>>
>>>>>
>>>>> I am not sure why reinstalling doesn't work and I am myself on Linux
>>>>> so can't test now. You can try to paste a line like this:
>>>>>
>>>>> set PATH=%PATH%;C:\Program Files\R\R-3.5.0\bin
>>>>>
>>>>> in the GRASS terminal (the black one), you need to change the path to
>>>>> R based on your R installation. Then try to run Rscript in the terminal,
>>>>> just to see if the binary can now be found. If yes, try to run
>>>>> r.futures.potential. This temporarily changes the PATH variable so that
>>>>> your system can find R, once you close GRASS, you need to repeat this next
>>>>> you need to run it. Let us know if at least this works.
>>>>>
>>>>> Anna
>>>>>
>>>>>
>>>>>>
>>>>>> Best regards
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> Am Mi., 9. Dez. 2020 um 15:01 Uhr schrieb Anna Petrášová <
>>>>>> kratochanna at gmail.com>:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Dec 9, 2020 at 8:37 AM Tom Hackbarth <txhackbarth at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Dear grass users,
>>>>>>>>
>>>>>>>> I am trying to work my way through the r.futures workshop (
>>>>>>>> https://grasswiki.osgeo.org/wiki/Workshop_on_urban_growth_modeling_with_FUTURES#Potential_submodel),
>>>>>>>> but as soon as I get to the point of using the first r.futures module -
>>>>>>>> r.futures-potential I come to a dead end.
>>>>>>>>
>>>>>>>> This is the message I get:
>>>>>>>>
>>>>>>>> ___________________________
>>>>>>>>
>>>>>>>> r.futures.potential input=sampling at practice1 output=potential.csv
>>>>>>>> columns=devpressure_0_5_92,road_dens_perc,forest_1992_smooth_perc,dist_to_water_km,dist_to_protected_km
>>>>>>>> developed_column=urban_change_clip subregions_column=counties
>>>>>>>> Computing model...
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "C:\Users\XXXX\AppData\Roaming\GRASS7\addons/scripts
>>>>>>>> /r.futures.potential.py", line 221, in <module>
>>>>>>>>     sys.exit(main())
>>>>>>>>   File "C:\Users\XXXX\AppData\Roaming\GRASS7\addons/scripts
>>>>>>>> /r.futures.potential.py", line 192, in main
>>>>>>>>     p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
>>>>>>>> stderr=subprocess.PIPE)
>>>>>>>>   File "D:\Programme\apps\Python37\lib\subprocess.py", line
>>>>>>>> 756, in __init__
>>>>>>>>     restore_signals, start_new_session)
>>>>>>>>   File "D:\Programme\apps\Python37\lib\subprocess.py", line
>>>>>>>> 1155, in _execute_child
>>>>>>>>     startupinfo)
>>>>>>>> FileNotFoundError: [WinError 2] The system cannot find the file
>>>>>>>> specified)
>>>>>>>>
>>>>>>>> _____________________________
>>>>>>>>
>>>>>>>> There seems to be a problem with the Python code. I also tried to
>>>>>>>> work it out on linux manjaro, but I get more or less the same error message
>>>>>>>> in the End.
>>>>>>>>
>>>>>>>> Is there anyone who can help me on this? I came not even close to
>>>>>>>> repairing the error, so I am happy about any advice one can give me.
>>>>>>>>
>>>>>>>> Thank you in advance.
>>>>>>>>
>>>>>>>> Copying response from grass-web:
>>>>>>>
>>>>>>> r.futures.potential calls Rscript, so the error means it can't find
>>>>>>> the Rscript binary. If R is installed, I would recommend reinstalling
>>>>>>> GRASS, during installation it tries to automatically look for it, so there
>>>>>>> is a chance it will work then. I would recommend subscribing to grass-user
>>>>>>> mailing list and ask more questions there.
>>>>>>>
>>>>>>> Anna
>>>>>>>
>>>>>>>
>>>>>>>> Best regards
>>>>>>>>
>>>>>>>> Tom
>>>>>>>> _______________________________________________
>>>>>>>> grass-user mailing list
>>>>>>>> grass-user at lists.osgeo.org
>>>>>>>> https://lists.osgeo.org/mailman/listinfo/grass-user
>>>>>>>>
>>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20201211/9b403a5f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 209537 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20201211/9b403a5f/attachment-0001.png>


More information about the grass-user mailing list