qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.09k stars 2.93k forks source link

Path error GRASS plugin QGIS 3.14 #38595

Open Proutbill opened 3 years ago

Proutbill commented 3 years ago

MAC OS 10.15.4 and QGIS 3.14. Grass Plugin couldn't be found: original path was tied to QGIS 3.12 instead of 3.14>> /Applications/QGIS3.12.app/Contents/Resources/grass7 Good path is /Applications/QGIS3.14.app/Contents/Resources/grass7

gioman commented 3 years ago

@Proutbill is this a suggestion for a patch? a bug report? else?

Proutbill commented 3 years ago

Yes it was a suggestion for a bug, but I couldn’t change the label/tag. Sorry about that. I just wanted to help people who might face the same issue!

On Sep 4, 2020, at 3:50 AM, Giovanni Manghi notifications@github.com wrote:

 @Proutbill is this a suggestion for a patch? a bug report? else?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gioman commented 3 years ago

@Proutbill what installer have you used?

Proutbill commented 3 years ago

The one native in my mac. And the files download from QGIS website.

On Sep 4, 2020, at 6:23 AM, Giovanni Manghi notifications@github.com wrote:

@Proutbill what installer have you used?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gioman commented 3 years ago

@PeterPetrik ping(?).

PeterPetrik commented 3 years ago

can you try with clean profile? GRASS path can be saved in your preferences. also please try grass from nightly2 builds https://qgis.org/downloads/macos/nightly2/

Proutbill commented 3 years ago

Sorry, my computer skills are limited. I just wanted to report a problem. I have no idea what you are talking about. I downloaded a package, installed it. Grass Plugin wouldn’t work and I had an error message about the path. When I went in the settings I saw that the path was written for another version of QGIS (3.12 and I had 3.14). I fixed the path. Sorry I can’t be more helpful. I went on several forums. And a lot of people are experiencing this problem. I just wanted to help them.

On Sep 4, 2020, at 7:19 AM, Peter Petrik notifications@github.com wrote:

 can you try with clean profile? GRASS path can be saved in your preferences. also please try grass from nightly2 builds https://qgis.org/downloads/macos/nightly2/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gioman commented 3 years ago

Sorry, my computer skills are limited

settings > user profiles > new profile

DelazJ commented 3 years ago

From the one-click installer, I had 3.10 installed (and next to it) 3.14. My default profile for 3.14 is showing 3.10 in the "Grass7 path" and "doc path". A new user profile shows 3.14 paths. I guess paths are not updated while installing a new version.

PeterPetrik commented 3 years ago

I think paths are stored in user profile, and in new profile they are guessed from the installation dir. So I do not think this is bug as such since you can set your GRASS dir to custom one .?.

gioman commented 3 years ago

I think paths are stored in user profile, and in new profile they are guessed from the installation dir. So I do not think this is bug as such since you can set your GRASS dir to custom one .?.

it's tricky we had similar problems in the past with Processing and SAGA, GRASS paths stored at user level and not changed when installing newer versions... not sure how to classify this.

PeterPetrik commented 3 years ago

workaround: go to Menu->Settings->Options->Processing(left)->Providers->Grass->set GRASS7 folder to /Application/QGIS.app/Contents/MacOS/grass78 or where you installation points to

PeterPetrik commented 3 years ago

Interestingly GRASS_FOLDER is only and only used on MacOS. I imagine it is some workaround for previous issues.

dkav commented 3 years ago

Still not working on qgis_nightly2_master_20200922_013400. Here is the error:

GRASS init error : GRASS was not found in 'INVALID/S/qgis-deps-0.5.4/stage/grass78' (GISBASE), provider and plugin will not work.

PeterPetrik commented 3 years ago

@dkav is this clean profile? also any change you have GISBASE in your environment somewhere (in terminal write env | grep GISBASE)? Can you upen QGIS Python console and type

import os
os.getenv('GISBASE')
dkav commented 3 years ago

Yes, clean profile. No GISBASE environmental settings via shell. Similarly, no value with getenv.

PeterPetrik commented 3 years ago

@dkav but GRASS in processing toolbox is present, only GRASS plugin is not ready, right?

can you try to run ln -s ./grass78 /Applications/QGIS.app/Contents/MacOS/grass and let me know if it works as expected? i will fix in the packager if that works.

dkav commented 3 years ago

Processing toolbox is crashing the application. See #38960.

PeterPetrik commented 3 years ago

What MacOS version do you have?

Proutbill commented 3 years ago

Mac os 10.15.4 I'm having another problem. I fixed the path so I can open grass and create a new mapset, but I can't import any layer in the mapset using the browser.

On Tue, Sep 22, 2020 at 3:00 PM Peter Petrik notifications@github.com wrote:

What MacOS version do you have?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qgis/QGIS/issues/38595#issuecomment-696947805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ3VYIEHBWSBV53W3Q5XAI3SHD67DANCNFSM4QW5LXGQ .

-- Helene Avocat

PhD Geography and Planning GIS and Cartography consultant Visiting Assistant Professor Department of Geography and Geospatial Sciences Kansas State University

dkav commented 3 years ago

MacOS - 10.15.6. Creating the symbolic link resolved the issue.

Not sure if this is related or if I am conflating other issues, but I got the following error when loading a GRASS raster while testing. (Vector layer loaded.)

2020-09-22T13:13:54 CRITICAL Invalid Layer : GRASS provider Cannot get projection Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 GRASS provider Cannot get raster extent : Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 GRASS provider Cannot get map info Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 Raster layer Provider is not valid (provider: grassraster, URI: /Users/dkav/Downloads/grass/test/PERMANENT/cellhd/test

Which may be related to QGIS on startup complaining about missing projdb (or maybe this has nothing to do with projections). From Terminal:

proj_create_from_database: Cannot find proj.db proj_create_from_database: Cannot find proj.db proj_get_authorities_from_database: Cannot find proj.db Warning: QWidget::insertAction: Attempt to insert null action Warning: QWidget::insertAction: Attempt to insert null action Warning: QWidget::insertAction: Attempt to insert null action proj_as_wkt: Cannot find proj.db proj_create_from_wkt: Cannot find proj.db proj_identify: Cannot find proj.db proj_as_wkt: Cannot find proj.db

PeterPetrik commented 3 years ago

what is qgis.g.info7 ? I cannot find anything with such name in qgis/QGIS not OSGeo/GRASS repositories?

for proj issue, can you follow https://github.com/qgis/QGIS/issues/38919?

import os
os.getenv('PROJ_LIB')

and check if such folder exists with proj.db?

PeterPetrik commented 3 years ago

Mac os 10.15.4 I'm having another problem. I fixed the path so I can open grass and create a new mapset, but I can't import any layer in the mapset using the browser.

in Plugins>Grass>Open/New Mapset

Screenshot 2020-09-22 at 23 12 25
dkav commented 3 years ago

Re qgis.g.info7 - I have no idea. I found a reference to it on #31397 and here QGIS/ms-windows/osgeo4w/package.cmd

dkav commented 3 years ago

Re qgis.g.info7, on the qgis_nightly2_master_20200923_133843.dmg build the error reported when loading a raster via the Browser panel is:

CRITICAL Invalid Layer : GRASS provider Cannot get projection Cannot run module command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=proj stdout: stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 Reason: image not found

GRASS provider Cannot get raster extent : Cannot run module command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=size rast=test2@PERMANENT stdout: stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 Reason: image not found

GRASS provider Cannot get map info Cannot run module command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=info rast=test2@PERMANENT stdout: stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7 Reason: image not found

Raster layer Provider is not valid (provider: grassraster, URI: /Users/dkav/Downloads/grass/test/PERMANENT/cellhd/test2

PeterPetrik commented 3 years ago

@dkav can you write me steps how to reproduce it?

dkav commented 3 years ago

I just double clicked on a GRASS raster in the browser window. You will need a GRASS database setup with raster to replicate. (Same error on 3.14.)

sr

dkav commented 3 years ago

Just to double check, I imported a different raster into a GRASS DB and the same problem arose. I was able to open both rasters in the GRASS GUI (on Windows).

drf5n commented 3 years ago

@dkav but GRASS in processing toolbox is present, only GRASS plugin is not ready, right?

can you try to run ln -s ./grass78 /Applications/QGIS.app/Contents/MacOS/grass and let me know if it works as expected? i will fix in the packager if that works.

In what directory do you intend this symbolic link to be made? In my QGIS 3.16.0 install I have these:

$ ls -lad /Applications/QGIS.app/Contents/Resources/gr*
drwxr-xr-x@  6 drf  admin  192 Oct 26 11:21 /Applications/QGIS.app/Contents/Resources/grass
drwxr-xr-x@ 23 drf  admin  736 Oct 27 15:30 /Applications/QGIS.app/Contents/Resources/grass78

...and I'm getting the "stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib" error as in @dkav's comment: https://github.com/qgis/QGIS/issues/38595#issuecomment-698486947.

dkav commented 3 years ago

In addition to the raster issue, the following error is logged in MacOS Crash Reports when opening (successfully) a GRASS vector layer.

Process:               qgis.g.info7 [51744]
Path:                  /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Identifier:            qgis.g.info7
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        QGIS [51729]
Responsible:           QGIS [51729]
User ID:               501

Date/Time:             2020-12-08 23:52:01.645 -0800
OS Version:            Mac OS X 10.15.7 (19H15)
Report Version:        12
Anonymous UUID:        94FB247C-3070-FF2F-E526-5D1B9C3DF18B

Sleep/Wake UUID:       625DC8C2-F916-4995-B582-3C792052DC06

Time Awake Since Boot: 360000 seconds
Time Since Wake:       4200 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @rpath/libgrass_gis.7.8.dylib
  Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
  Reason: image not found

Binary Images:
       0x10c8ae000 -        0x10c8b1fff +qgis.g.info7 (0) <56669D8F-0451-3D4B-9A96-49235B9BD129> /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
       0x1159d5000 -        0x115a66f47  dyld (750.6) <1D318D60-C9B0-3511-BE9C-82AFD2EF930D> /usr/lib/dyld
dkav commented 3 years ago

This may confuse matters but the errors reference in my most recent comment and my earlier comment are independent of the GRASS plugin. The errors are reported if the GRASS plugin is enabled or disabled.

github-actions[bot] commented 3 years ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.