Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CRS Error #57

Open
PsjPaulus opened this issue Dec 17, 2024 · 2 comments
Open

CRS Error #57

PsjPaulus opened this issue Dec 17, 2024 · 2 comments

Comments

@PsjPaulus
Copy link

Hi there, I was having an installation error and I don´t know how to fix it. It will be really helpful if you tell me how. Thanks in advance.

No se pudo cargar el complemento 'Geo-SAM'

rasterio.errors.CRSError: The EPSG code is unknown. PROJ: proj_create_from_database: C:\PROGRA1\QGIS331.3\share\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 4 is expected. It comes from another PROJ installation.
Traceback (most recent call last):
File "rasterio\crs.pyx", line 592, in rasterio.crs.CRS.from_epsg
File "rasterio\_err.pyx", line 289, in rasterio._err.exc_wrap_int
rasterio._err.CPLE_AppDefinedError: PROJ: proj_create_from_database: C:\PROGRA1\QGIS331.3\share\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 4 is expected. It comes from another PROJ installation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 401, in loadPlugin
import(packageName)
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM_init
.py", line 7, in
from .geo_sam_tool import Geo_SAM
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\geo_sam_tool.py", line 10, in
from .tools.widgetTool import Selector, EncoderCopilot
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\tools\widgetTool.py", line 21, in
from torchgeo.datasets import BoundingBox
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\torchgeo\datasets_init
.py", line 6, in
from .advance import ADVANCE
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\torchgeo\datasets\advance.py", line 17, in
from .geo import NonGeoDataset
File "C:\PROGRA1/QGIS331.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\torchgeo\datasets\geo.py", line 42, in
class GeoDataset(Dataset[dict[str, Any]], abc.ABC):
File "C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\torchgeo\datasets\geo.py", line 85, in GeoDataset
_crs = CRS.from_epsg(4326)
File "rasterio\crs.pyx", line 596, in rasterio.crs.CRS.from_epsg
rasterio.errors.CRSError: The EPSG code is unknown. PROJ: proj_create_from_database: C:\PROGRA1\QGIS331.3\share\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 4 is expected. It comes from another PROJ installation.

Versión de Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
Versión de QGIS: 3.32.3-Lima Lima, 67d46100b5

Ruta de Python:
C:\Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OpenTopography-DEM-Downloader
C:/PROGRA1/QGIS331.3/apps/qgis/./python
C:/Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS331.3/apps/qgis/./python/plugins
C:\PROGRA1\QGIS331.3\apps\grass\grass83\etc\python
C:\Windows\system32
C:\Program Files\QGIS 3.32.3\bin\python39.zip
C:\PROGRA1\QGIS331.3\apps\Python39\DLLs
C:\PROGRA1\QGIS331.3\apps\Python39\lib
C:\Program Files\QGIS 3.32.3\bin
C:\Users\paola\AppData\Roaming\Python\Python39\site-packages
C:\PROGRA1\QGIS331.3\apps\Python39
C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages
C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\win32
C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA1\QGIS331.3\apps\Python39\lib\site-packages\Pythonwin
C:/Users/paola/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\paola\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Terraform\external\numpy_groupies-0.9.20-py3-none-any.whl
C:\Users\paola\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Terraform\external\tabulate-0.9.0-py3-none-any.whl
C:\Users\paola\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Terraform\external\xlsxwriter-3.0.9-py3-none-any.whl

@Fanchengyan
Copy link
Collaborator

Fanchengyan commented Dec 18, 2024

Hi @PsjPaulus

This issue is similar to #29 (comment), where multiple versions of PROJ are installed. The issue suggests that the proj.db file located at C:\\PROGRA1\\QGIS331.3\\share\\proj\\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2, whereas a version number greater than or equal to 4 is expected. This discrepancy arises from another PROJ installation. To resolve this, you need to update the proj.db file in C:\\PROGRA1\\QGIS331.3\\share\\proj\\. Try running the following commands in OSGeo4W Shell (open as Administrator) to see if it works:

pip install pyproj rasterio -U

If the issue persists, you may need to update this file manually.

@PsjPaulus
Copy link
Author

Hi, I already did what you suggested and it didn´t worked. How can I update the file manually?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants