cxcandid / GeorefExtension

Extension to the QGIS Raster Georeferencer Plugin
GNU General Public License v3.0
3 stars 0 forks source link

Does'nt work on my Mac #3

Open ades33 opened 2 months ago

ades33 commented 2 months ago

HI, your extension seems great, but, can't use, Mac OS 14.6.1by OCLP on macmini late 2012

error message is :

RuntimeError: Cannot call gdal.DontUseExceptions() at that point since the stack of error handlers is: osr ogr gdal Traceback (most recent call last): File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/qgis/utils.py", line 426, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/erik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeorefExtension/init.py", line 36, in classFactory from .GeorefExtension import GeorefExtension File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/qgis/utils.py", line 923, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/erik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeorefExtension/GeorefExtension.py", line 47, in gdal.DontUseExceptions() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg/osgeo/gdal.py", line 197, in DontUseExceptions return _gdal.DontUseExceptions(*args) RuntimeError: Cannot call gdal.DontUseExceptions() at that point since the stack of error handlers is: osr ogr gdal

Version` de Python : 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)]

Version de QGIS : 3.38.2-Grenoble Grenoble, 130c432394e

Chemin` Python : /Applications/QGIS.app/Contents/MacOS/../Resources/python /Users/erik/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/erik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python39.zip /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9 /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload /Users/erik/Library/Application Support/QGIS/QGIS3/profiles/default/python

cxcandid commented 2 months ago

Unfortunately I have no MAC to test, but you could try to set line 47 in GeorefExtension.py to comment.

# gdal.DontUseExceptions()
ades33 commented 2 months ago

thanks a lot, and, sorry… I don't know anything about programming, so I'll just have to hope... that someone who has encountered the same problem will be able to suggest a way easy to apply… wait and see …
in the meantime, if I find the time quickly, I'll do a test with linuxmint

paul0207 commented 2 months ago

I have an M1 Mac and the proposed fix (commenting line 47 in GeorefExtension.py) works for installing the plugin. Anyway, when executing Create Virtual Raster I get this error: ValueError: invalid literal for int() with base 10: 'EPSG:4326' Thanks!

cxcandid commented 2 months ago

@paul0207 sorry I never tested with geographic coordinate systems like wgs84. I'll have a look at that.

cxcandid commented 2 months ago

@paul0207 tested WGS84 (source and target) without any problems on QGIS 3.38.2 (Windows 10). There were some problems with coordinate order, that were solved by setting the Coordinate order in Project settings.

image

paul0207 commented 2 months ago

Thank you Christoph, but I still get the same "invalid literal" error after going to Project General properties and setting the Coordinate order.

cxcandid commented 1 month ago

@paul0207 can you please post the complete error message so I can see the line number where the error occurs.

paul0207 commented 2 weeks ago

@cxcandid I'm not using the extension anymore but thanks anyway for looking into the issue.

cxcandid commented 6 days ago

@ades33 @paul0207 I was lucky enough to test the plugin on Mac OS and removed some bugs. Please try the new version 3.0.7.

ades33 commented 5 days ago

seems work. No error message when I install the extension in Qgis 3.34 I'll try to use it next week, when I'll find time to, in Qgis 3.34 and peurhaps 3.40 Thank a lot for your work.