[GRASS-user] r.futures.potential - unable to open select-cursor

Tom Hackbarth txhackbarth at gmail.com
Tue Feb 9 06:15:39 PST 2021


Hi Anna,

thanks for that input. The error message is gone now, but another one has
occurred:

Traceback (most recent call last):
  File "C:\Users\txhac\AppData\Roaming\GRASS7\addons/scripts
/r.futures.potential.py", line 221, in <module>
    sys.exit(main())
  File "C:\Users\txhac\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] Das System kann die
angegebene Datei nicht finden

This is just the same as we have already discussed here:
https://www.mail-archive.com/grass-user@lists.osgeo.org/msg39421.html

I cannot understand why I am back at this problem again, as I have changed
nothing since it worked the last time. I have done everything Helmut told
me the last time to do, when it worked in the end, but I cannot get it
going.

Just to let you know where I stand:

- R is on the right path (C:\\)
- R has always been run system wide as administrator
- rabatch version 149-4 is installed
- set PATH=%PATH%;C:\Program Files\R\R-4.0.3\bin has been included
- R libraries have been installed, but when I type in library("MuMIn") in
the terminal, nothing happens
- when I run R or Rscript in the terminal the right response is shown, but
only if I run them separately. If i try to run Rscript after running R in
the terminal, Rscript will not be found. Maybe this is the problem?


C:\>set PATH=%PATH%;C:\Program Files\R\R-4.0.3\bin

C:\>R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
Tippen Sie 'license()' or 'licence()' f├╝r Details dazu.

R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
Tippen Sie 'contributors()' f├╝r mehr Information und 'citation()',
um zu erfahren, wie R oder R packages in Publikationen zitiert werden
k├Ânnen.

Tippen Sie 'demo()' f├╝r einige Demos, 'help()' f├╝r on-line Hilfe, oder
'help.start()' f├╝r eine HTML Browserschnittstelle zur Hilfe.
Tippen Sie 'q()', um R zu verlassen.

Beim Start - Warnmeldungen:
1: Setting LC_CTYPE=de_DE.cp1252 failed
2: Setting LC_COLLATE=de_DE.cp1252 failed
3: Setting LC_TIME=de_DE.cp1252 failed
4: Setting LC_MONETARY=de_DE.cp1252 failed
> Rscript
Fehler: Objekt 'Rscript' nicht gefunden

Thank you for the help and sorry that I have to bother you with the same
issue again, but I am quite lost as I cannot understand what the problem is
this time. It's probably again the connection between GRASS and R, but as I
already wrote, I did everything just the same way as last time, where it
worked.

Best regards

Tom

Am Mo., 8. Feb. 2021 um 16:27 Uhr schrieb Anna Petrášová <
kratochanna at gmail.com>:

> In the r.futures.potential command you have some of the column names
> incorrect:
> developed_column=urban_change_clip1 at IKNmapset
> subregions_column=Subregions_IKN at IKNmapset
>
> Remove the @mapset part, that should do it.
>
> Please 'reply to all' to keep the conversation on the mailing list.
>
> On Mon, Feb 8, 2021 at 5:16 AM Tom Hackbarth <txhackbarth at gmail.com>
> wrote:
>
>> Hi Anna,
>>
>> thank you for the reply!
>>
>> The results of v.db.select are attached in the .txt file.
>>
>> v.info gives me the following information:
>>
>>  +----------------------------------------------------------------------------+
>>  | Name:            sampling3
>>     |
>>  | Mapset:          IKNmapset
>>     |
>>  | Location:        newLocation
>>     |
>>  | Datenbank:       C:\Users\txhac\Documents\Uni\Master\Master
>> Thesis\grassda |
>>  | Titel:           Output from v.patch
>>     |
>>  | Maßstab:         1:1
>>     |
>>  | Name des Erzeugers:txhac
>>     |
>>  | Organisation:
>>      |
>>  | Quelldatum:      Sat Feb 06 15:55:09 2021
>>      |
>>  | Timestamp (first layer): none
>>      |
>>
>>  |----------------------------------------------------------------------------|
>>  | Kartenformat:    native
>>      |
>>
>>  |----------------------------------------------------------------------------|
>>  |   Kartenart:: Vektor (level: 2)
>>      |
>>  |
>>      |
>>  |   Anzahl der Punkte:      6000            Anzahl der Zentroide: 0
>>      |
>>  |   Anzahl der Linien:      0               Anzahl der Grenzen:   0
>>      |
>>  |   Anzahl der Flächen:     0               Anzahl der Inseln:    0
>>      |
>>  |
>>      |
>>  |   Map is 3D:              No
>>     |
>>  |   Anzahl der dblinks:     1
>>      |
>>  |
>>      |
>>  |   Projektion: UTM (Zone 50S)
>>     |
>>  |
>>      |
>>  |               N:           9928525    S:           9858735
>>     |
>>  |               E:            529655    W:            447765
>>     |
>>  |
>>      |
>>  |   Digitalisierungs-Schwellwert:: 0
>>     |
>>  |   Kommentar:
>>     |
>>  |
>>      |
>>
>>  +----------------------------------------------------------------------------+
>>
>>
>>
>>
>> Am Mo., 8. Feb. 2021 um 04:39 Uhr schrieb Anna Petrášová <
>> kratochanna at gmail.com>:
>>
>>> Hi,
>>>
>>> that would indicate some issue with your sampling3 vector. Could you
>>> post here the output of v.info sampling3 and v.db.select sampling3?
>>>
>>> On Sun, Feb 7, 2021 at 5:06 AM Tom Hackbarth <txhackbarth at gmail.com>
>>> wrote:
>>>
>>>> Dear all,
>>>>
>>>> anyone ever had problems with opening the select-cursor. I do not know
>>>> what the problem is and tried to change input parameters several times, but
>>>> whenever I want to run r.futures.potential, I get the same error message: unable
>>>> to open select-cursor.
>>>>
>>>> If anybody ever had similar problems and knows how to deal with it, I
>>>> would be very happy if you would share the solution with me. Or is there
>>>> anyone who might have some ideas on how to fix this?
>>>>
>>>> Thanks already in advance!
>>>>
>>>> The error message can be seen at the end of this mail.
>>>>
>>>> Best regards
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>>> r.futures.potential --overwrite input=sampling3 at IKNmapset
>>>> output=potential.csv
>>>> columns=devpressure_02_24,road_dens_perc,forest_smooth_perc,dist_roads_km,dist_to_forests_km,dist_to_urbancore_km,dist_waterbodies_km
>>>> developed_column=urban_change_clip1 at IKNmapset
>>>> subregions_column=Subregions_IKN at IKNmapset
>>>> ERROR: Kann den Select-Cursor nicht öffnen.
>>>> Traceback (most recent call last):
>>>>   File "C:\Users\txhac\AppData\Roaming\GRASS7\addons/scripts
>>>> /r.futures.potential.py", line 221, in <module>
>>>>     sys.exit(main())
>>>>   File "C:\Users\txhac\AppData\Roaming\GRASS7\addons/scripts
>>>> /r.futures.potential.py", line 168, in main
>>>>     columns="distinct {level}".format(level=level)).strip()
>>>>   File "D:\Programme\apps\grass\grass78\etc\python\grass\scr
>>>> ipt\core.py", line 503, in read_command
>>>>     return handle_errors(returncode, stdout, args, kwargs)
>>>>   File "D:\Programme\apps\grass\grass78\etc\python\grass\scr
>>>> ipt\core.py", line 343, in handle_errors
>>>>     returncode=returncode)
>>>> grass.exceptions.CalledModuleError: Module run None
>>>> v.db.select -c map=sampling3 at IKNmapset columns=distinct
>>>> Subregions_IKN at IKNmapset ended with error
>>>> Process ended with non-zero return code 1. See errors in the
>>>> (error) output.
>>>> (Sun Feb  7 11:00:09 2021) Befehl ausgeführt (0 Sek)
>>>> _______________________________________________
>>>> 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/20210209/3cfd573b/attachment.html>


More information about the grass-user mailing list