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

Crash on UMEP plugin install #666

Open
mothlight opened this issue Nov 5, 2024 · 4 comments
Open

Crash on UMEP plugin install #666

mothlight opened this issue Nov 5, 2024 · 4 comments

Comments

@mothlight
Copy link

Describe the bug
The install of UMEP crashes when I try to install it on Ubuntu 22.04 and QGIS 3.22.4. I'll see if I can figure out what is going on. I assume it is the older version of QGIS. It is the most recent version available for 22.04.

I was able to successfully install it on Fedora 40 and QGIS 3.34.

Couldn't load plugin 'processing_umep' due to an error when calling its classFactory() method

SystemError: initialization of _internal failed without raising an exception
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/init.py", line 46, in classFactory
from .processing_umep import ProcessingUMEPPlugin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep.py", line 38, in
from .processing_umep_provider import ProcessingUMEPProvider
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep_provider.py", line 54, in
from .processor.urock_processing_algorithm import URockAlgorithm
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processor/urock_processing_algorithm.py", line 64, in
from ..functions.URock import MainCalculation
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/MainCalculation.py", line 19, in
from . import WindSolver
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/WindSolver.py", line 18, in
from numba import jit
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages/numba/init.py", line 93, in
from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/lib/python3/dist-packages/numba/np/ufunc/init.py", line 3, in
from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/lib/python3/dist-packages/numba/np/ufunc/decorators.py", line 3, in
from numba.np.ufunc import _internal
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
SystemError: initialization of _internal failed without raising an exception

Python version: 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0]
QGIS version: 3.22.4-Białowieża Białowieża, exported

Python Path:
/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages
/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages
/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins/UMEP/SUEWSPrepare/Modules
/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages
/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages
/usr/share/qgis/python
/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python
/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/home/unimelb.edu.au/knice/.local/lib/python3.10/site-packages
/usr/local/lib/python3.10/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.10/dist-packages
/home/unimelb.edu.au/knice/.local/share/QGIS/QGIS3/profiles/default/python

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • QGIS Version 3.22.4
  • UMEP Version
  • SuPy Version

Screenshots
If applicable, add screenshots to help explain your problem.

Data
If applicable, add data files to help us reproduce your problem.

Additional context
Add any other context about the problem here.

@j3r3m1
Copy link

j3r3m1 commented Nov 5, 2024

I can reproduce the error with the same configuration. I already had this problem in the past due to the use of Numba lib in QGIS but this was for Windows and I have never received any answer ().

However, installing QGIS and UMEP into Ubuntu 22.04 should not be an issue if you are allow and willing to use conda or mamba environments (#585 (comment)).

If so I recommend to install mamba (https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) and to simply do the following in a terminal:

mamba install -n myQgisUmepEnv gdal qgis jaydebeapi "numpy<2.0.0" numba netCDF4 pandas scipy matplotlib xarray unidecode
mamba activate myQgisUmepEnv
qgis

@bartpannemans
Copy link

Hello,

FYI: I got the same error message while installing UMEP_processing on Windows.

However, when cancelling the error window, the next message says the plugin was installed successfully. I restarted QGis, and both plugins are present. So I don't know whether the plugin is indeed successfully installed, or something is still missing.

As for the solution proposed by @j3r3m1, I wouldn't know how to do this on Windows, and specify a conda environment in QGis.

  • Windows 11
  • QGis: 3.36.3 Maidenhead
  • Pyton 3.12.3
  • UMEP-version: the development version sent around by Frederik on 1/11 at this link
  • installing via plugin manager of QGis, option 'install from ZIP'.
    • Click Yes when asked to download extra dependencies
    • Click Yes when asked to restart QGis
    • Then I get the error message.

Couldn't load plugin 'processing_umep' due to an error when calling its classFactory() method

SystemExit: 'jaydebeapi' Python package is missing
Traceback (most recent call last):
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 23, in
import jaydebeapi
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'jaydebeapi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 426, in startPlugin
plugins[packageName] = package.classFactory(iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep_init
.py", line 46, in classFactory
from .processing_umep import ProcessingUMEPPlugin
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processing_umep.py", line 38, in
from .processing_umep_provider import ProcessingUMEPProvider
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processing_umep_provider.py", line 54, in
from .processor.urock_processing_algorithm import URockAlgorithm
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processor\urock_processing_algorithm.py", line 64, in
from ..functions.URock import MainCalculation
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\MainCalculation.py", line 11, in
from . import H2gisConnection
File "C:\PROGRA1/QGIS331.2/apps/qgis/./python\qgis\utils.py", line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 27, in
exit("'jaydebeapi' Python package is missing")
File "", line 26, in call
SystemExit: 'jaydebeapi' Python package is missing

Python version: 3.12.3 (main, Apr 14 2024, 17:21:43) [MSC v.1938 64 bit (AMD64)]
QGIS version: 3.36.2-Maidenhead Maidenhead, 6d250527

Python Path:
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:\Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\SUEWSPrepare/Modules
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:\Users\happy\AppData\Roaming\Python\Python312\site-packages
C:/PROGRA1/QGIS331.2/apps/qgis/./python
C:/Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS331.2/apps/qgis/./python/plugins
C:\PROGRA1\QGIS331.2\apps\grass\grass83\etc\python
C:\Users\happy\Documents
C:\Program Files\QGIS 3.36.2\bin\python312.zip
C:\PROGRA1\QGIS331.2\apps\Python312\DLLs
C:\PROGRA1\QGIS331.2\apps\Python312\Lib
C:\Program Files\QGIS 3.36.2\bin
C:\PROGRA1\QGIS331.2\apps\Python312
C:\PROGRA1\QGIS331.2\apps\Python312\Lib\site-packages
C:\PROGRA1\QGIS331.2\apps\Python312\Lib\site-packages\win32
C:\PROGRA1\QGIS331.2\apps\Python312\Lib\site-packages\win32\lib
C:\PROGRA1\QGIS331.2\apps\Python312\Lib\site-packages\Pythonwin
C:/Users/happy/AppData/Roaming/QGIS/QGIS3\profiles\default/python
D:/Bkode/zz/03_testing/01_testing_UMEP

@biglimp
Copy link
Contributor

biglimp commented Dec 3, 2024

@bartpannemans , we are aware of this issue on some windows machines and have for a long time tried to work out a solution (not there yet). A restart should activate umep, eventhough you got an error message concerning jaydeapi.

I would NOT recommend the anaconda solution on windows. We have experienced multiple issues using anaconda/QGIS on windows over the years. Maybe it is better not so please report back your experience.

@biglimp
Copy link
Contributor

biglimp commented Dec 13, 2024

Has this been sorted out? Can I close?

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

4 participants