Closed HamishJJ86 closed 1 year ago
Hi Hamish,
Can you give me a bit more information please. I need to know the version of qgis you are using, the operating system you are using and how you installed geotrace. I don't actively develop or maintain geotrace any more but I am happy to try and help with getting it working.
Thanks
Hi Lachlangrose,
thank you for your reply - I am very keen to try out your software.
I am using QGIS 3.24.2 on a Windows 10 device.
I experimented with installing the most recent release directly through the QGIS plugin manager, and unzipping the download folder downloaded from QGIS plugin website + the master copy on github. I tried installing the two previous versions via unzipping the folder into the QGIS plugin manager.
I followed the instructions for installing mplstereonet and scikit-image on your github page, and also tried installing these directly into QGIS python console using the instructions here https://hatarilabs.com/ih-en/extracting-geological-faults-and-orientation-representation-in-qgis-with-geotrace-tutorial
The same error messages display upon clicking the compass.
Any help you can offer would be most appreciated.
Many thanks, Hamish
Hi,
The only dependencies that are installed by geotrace are mplstereonet and scikit-image. If you can open the python console in qgis... under the plugins banner and then run
import scikit-image
and
import mplstereonet
and tell me the output of both of these commands I can try and see what is causing the issues.
cheers
Hey,
The plugin returned an error for scikit-image Traceback (most recent call last): File "C:\OSGeo4W\apps\Python39\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 178, in call return _maybe_compile(self.compiler, source, filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 106, in _maybe_compile raise err1 File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 93, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 143, in call codeob = compile(source, filename, symbol, self.flags, True) File "", line 1 import scikit-image ^ SyntaxError: invalid syntax
But not for mplstereonet.
Many thanks, Hamish
Sorry that's my mistake, should be import skimage
On Wed, 11 May 2022, 18:44 HamishJJ86, @.***> wrote:
Hey,
The plugin returned an error for scikit-image Traceback (most recent call last): File "C:\OSGeo4W\apps\Python39\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 178, in call return _maybe_compile(self.compiler, source, filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 106, in _maybe_compile raise err1 File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 93, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "C:\OSGeo4W\apps\Python39\lib\codeop.py", line 143, in call codeob = compile(source, filename, symbol, self.flags, True) File "", line 1 import scikit-image ^ SyntaxError: invalid syntax
But not for mplstereonet.
Many thanks, Hamish
— Reply to this email directly, view it on GitHub https://github.com/lachlangrose/GeoTrace/issues/25#issuecomment-1123374523, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYHZAARG5ICIXOI7E6AIFTVJNXQRANCNFSM5VOFQIZQ . You are receiving this because you commented.Message ID: @.***>
I get no errors in the python console for skimage like mplstereonet
but when I run geotrace by clicking on the compass I get these as my python errors: 2022-05-11T10:58:00 WARNING Traceback (most recent call last): File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\install_dependencies.py", line 65, in install import gttracetool File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\gttracetool.py", line 36, in import gdal File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'gdal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace.py", line 188, in open_trace
self.dlg = GeoTraceDialog(self.iface)
File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace_dialog.py", line 70, in __init__
self.setup_gui()
File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace_dialog.py", line 94, in setup_gui
installer.Installer().install()
File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\install_dependencies.py", line 68, in install
assert False, "An unexpected import error occurred"
AssertionError: An unexpected import error occurred
Do any qgis plugins work for you? Gdal should be included in your python environment because qgis provides gdal...
On Wed, 11 May 2022, 20:00 HamishJJ86, @.***> wrote:
I get no errors in the python console for skimage like mplstereonet
but when I run geotrace by clicking on the compass I get these as my python errors: 2022-05-11T10:58:00 WARNING Traceback (most recent call last): File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\install_dependencies.py", line 65, in install import gttracetool File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\gttracetool.py", line 36, in import gdal File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'gdal'
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace.py", line 188, in open_trace self.dlg = GeoTraceDialog(self.iface) File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace_dialog.py", line 70, in __init__ self.setup_gui() File "C:\Users/hjohn/AppData/Roaming/QGIS/QGIS3\profiles\hjohn/python/plugins\GeoTrace-master\geo_trace_dialog.py", line 94, in setup_gui installer.Installer().install() File "C:\Users\hjohn\AppData\Roaming\QGIS\QGIS3\profiles\hjohn\python\plugins\GeoTrace-master\tools\install_dependencies.py", line 68, in install assert False, "An unexpected import error occurred" AssertionError: An unexpected import error occurred
— Reply to this email directly, view it on GitHub https://github.com/lachlangrose/GeoTrace/issues/25#issuecomment-1123483016, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYHZAFSK6HXZQTLTRME2ETVJOALTANCNFSM5VOFQIZQ . You are receiving this because you commented.Message ID: @.***>
Hi lachlangrose,
I did a search on my C drive, multiple Gdal files are present in various OSGeo4W folders.
I just installed "profile" through the QGIS plugin manager as it uses raster layers (assuming this uses Gdal)
I entered import Gdal in the QGIS python console to be sure, it returned this message:
Traceback (most recent call last):
File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
thank you for your help so far.
Hamish
Can you try uninstalling qgis and reinstalling? Maybe even change versions?
On Wed, 11 May 2022, 20:50 HamishJJ86, @.***> wrote:
Hi lachlangrose,
I did a search on my C drive, multiple Gdal files are present in various OSGeo4W folders. I just installed "profile" through the QGIS plugin manager as it uses raster layers (assuming this uses Gdal) I entered import Gdal in the QGIS python console to be sure, it returned this message: Traceback (most recent call last): File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'Gdal'
thank you for your help so far.
Hamish
— Reply to this email directly, view it on GitHub https://github.com/lachlangrose/GeoTrace/issues/25#issuecomment-1123568437, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYHZAGXE5WFSN3RD274TC3VJOGHVANCNFSM5VOFQIZQ . You are receiving this because you commented.Message ID: @.***>
Hi lachlangrose,
I have previously tried using the last version of QGIS 2 and reinstalling QGIS 3 without much luck - could you please recommend a QGIS version that I should install?
Many thanks, Hamish
Dear Lachlan and Sam, I am also having a similar problem with installing and running. I have tried installing on a new PC with Windows 10, without any Python installations and I am getting this issue:
AssertionError: An unexpected import error occurred Traceback (most recent call last): File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\install_dependencies.py", line 65, in install import gttracetool File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin__init.py", line 38, in wrapping_ee_import module = builtin_import(name, *args, **kwargs) File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\gttracetool.py", line 36, in import gdal File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin__init.py", line 38, in wrapping_ee_import module = builtin_import(name, *args, **kwargs) File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'gdal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GeoTrace\geo_trace.py", line 188, in open_trace self.dlg = GeoTraceDialog(self.iface) File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GeoTrace\geo_trace_dialog.py", line 70, in init self.setup_gui() File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GeoTrace\geo_trace_dialog.py", line 94, in setup_gui installer.Installer().install() File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\install_dependencies.py", line 68, in install assert False, "An unexpected import error occurred" AssertionError: An unexpected import error occurred
I have installed QGIS version 3.26.2-Buenos Aires.
I used the plugin manager in QGIS to install. I am running Windows 10.
I also tried on another 2 PC with similar issues.
In the Python console I can import skimage and mplstereonet. However import gdal gives a traceback error.
To fix this, I went through the errors and added 'from osgeo import gdal' and 'from osgeo import gdalnumeric' to the gttracetool.py, 'from osgeo import gdal' to geo_trace_dialog.py and install_dependencies.py
I still get warnings and have not tested Geotrace yet, but the GUI is appearing now
Testing it now gives me the following error when using cost calculator: Traceback (most recent call last): File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GeoTrace\geo_trace_dialog.py", line 369, in run_costcalculator calc.run_calculator(c[0], self.cost_name.text()) File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\gttracetool.py", line 522, in run_calculator array = self.calc_edges(0) File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\gttracetool.py", line 562, in calc_edges self.layer_to_numpy(self.layer) File "C:\Users\me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoTrace\tools\gttracetool.py", line 486, in layer_to_numpy self.transform = ds.GetGeoTransform() AttributeError: 'NoneType' object has no attribute 'GetGeoTransform'
An error has occurred while executing Python code:
NameError: name 'gttracetool' is not defined Traceback (most recent call last): File "C:\Users/me/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GeoTrace\geo_trace_dialog.py", line 437, in toggle_trace_tool self.tracetool = gttracetool.GtTraceTool(self.canvas, self.iface, target, cost) NameError: name 'gttracetool' is not defined
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.26.2-Buenos Aires Buenos Aires, feec3d3b12f
Hi, I am getting a few error messages after I click on the compass:
GeoTrace\geo_trace.py", line 188, in open_trace self.dlg = GeoTraceDialog(self.iface) GeoTrace\geo_trace_dialog.py", line 70, in init self.setup_gui() GeoTrace\geo_trace_dialog.py", line 94, in setup_gui installer.Installer().install() File GeoTrace\tools\install_dependencies.py", line 68, in install assert False, "An unexpected import error occurred"
Could you please advise?