Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Issue setting up Geotrace on Mac qgis 3.20 #24

Open
jaspermowatt opened this issue Jul 21, 2021 · 4 comments
Open

Issue setting up Geotrace on Mac qgis 3.20 #24

jaspermowatt opened this issue Jul 21, 2021 · 4 comments

Comments

@jaspermowatt
Copy link

Hi,

Having an issue trying to use geotrace on mac running qgis 3.20. I know it's not the stable version but the same issue was experienced in the stable versions of 3.+.

Below is the error message. Any help greatly appreciated

An error has occurred while executing Python code:

UnboundLocalError: local variable 'out' referenced before assignment
Traceback (most recent call last):
File "/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeoTrace/geo_trace.py", line 188, in open_trace
self.dlg = GeoTraceDialog(self.iface)
File "/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeoTrace/geo_trace_dialog.py", line 70, in init
self.setup_gui()
File "/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeoTrace/geo_trace_dialog.py", line 94, in setup_gui
installer.Installer().install()
File "/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeoTrace/tools/install_dependencies.py", line 61, in install
assert not importlib.find_loader('skimage') is None, "Could not install scikit-image. Pip output is as follows:\n%s" % out
UnboundLocalError: local variable 'out' referenced before assignment

Python version: 3.8.7 (default, May 24 2021, 13:02:34) [Clang 12.0.5 (clang-1205.0.22.9)]
QGIS version: 3.20.0-Odense Odense, decaadbb31

Python Path:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/opencv_contrib_python-4.3.0.36-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/pyproj-2.6.0-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/cftime-1.2.1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/netCDF4-1.5.4-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/GDAL-3.2.3-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/Fiona-1.8.13.post1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/scipy-1.5.1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/numba-0.50.1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/affine-2.3.0-py3.8.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/geopandas-0.8.1-py3.8.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/numpy-1.20.1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/rasterio-1.1.5-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python38.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/Rtree-0.9.4-py3.8.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/statsmodels-0.11.1-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/snuggs-1.4.7-py3.8.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/click_plugins-1.1.1-py3.8.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/pandas-1.1.0-py3.8-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages/patsy-0.5.1-py3.8.egg
/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GeoTrace/tools
/Users/jasper2/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/kmltools/libs

@lachlangrose
Copy link
Owner

Hi,

It looks like you have an issue installing scikit-image. Can you open the python console (open the plugins menu) in QGIS and run the code

import skimage

if this isn't successful can you try:

import subprocess subprocess.run('pip install scikit-image')

This should install scikit-image or give you an error message.

Good luck

@jaspermowatt
Copy link
Author

Hi thanks for the reply,
First go didn't work, here is the error:

import skimage
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'skimage'

Second didn't either:

import subprocess subprocess.run('pip install scikit-image')
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/code.py", line 63, in runsource
code = self.compile(source, filename, symbol)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/codeop.py", line 178, in call
return _maybe_compile(self.compiler, source, filename, symbol)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/codeop.py", line 106, in _maybe_compile
raise err1
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/codeop.py", line 93, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/codeop.py", line 143, in call
codeob = compile(source, filename, symbol, self.flags, 1)
File "", line 1
import subprocess subprocess.run('pip install scikit-image')
^
SyntaxError: invalid syntax

Tired splitting the command and this didn't work either:

import subprocess
subprocess.run('pip install scikit-image')
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pip install scikit-image'

Any further advice would be greatly appreciated.

Cheers

@lachlangrose
Copy link
Owner

Hi,

I believe the issue you are having is related to macosx. I have a colleague who had some issues getting GeoTrace installed, I'll try and find out how they solved the issues.

Cheers,
Lachlan

@HamishJJ86
Copy link

Hi Jasper,

did you manage to resolve your problem? I am recieving the same error messages.

Many thanks,
Hamish

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

No branches or pull requests

3 participants