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

the final SDG indicator, a python error occurred when running locally #796

Open
MrShuaiB1 opened this issue Jan 16, 2024 · 6 comments
Open

Comments

@MrShuaiB1
Copy link

My computer system is Mac os, Qgis is stable version 3.28.14, plug-in is the latest version of internal download. There was no problem in the calculation of sub_indicators, but there was an error in the calculation of SDG15.3.1. I changed a mac computer and it was still the same, which bothered me very much. I hope someone can help me solve it, thank you very much.My English is not very good, please forgive me.
截屏2024-01-16 13 34 37
截屏2024-01-16 13 34 43

@MrShuaiB1
Copy link
Author

2024-01-16T19:17:25 WARNING An error occurred while executing Python code:

         numba.core.errors.UnsupportedError: Failed in nopython mode pipeline (step: analyzing bytecode)
         Use of unsupported opcode (IS_OP) found
         
         File "Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg_numba.py", line 183:
         def calc_lc_trans(lc_bl, lc_tg, multiplier, recode_from=None, recode_to=None):
          
          # raw integer codes to ordinal values prior to calculating transitions
          if recode_from is not None and recode_to is not None:
          ^
         
         
         
         Traceback (most recent call last):
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/jobs/manager.py", line 194, in run
          self.results = execution_handler(
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/localexecution/ldn.py", line 369, in compute_ldn
          return summarise_land_degradation(
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 310, in summarise_land_degradation
          summary_table, output_path, reproj_path = _compute_ld_summary_table(
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 1230, in _compute_ld_summary_table
          ) = _process_region(
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 1174, in _process_region
          summary_table, output_paths = _aoi_process_sequential(inputs)
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 1084, in _aoi_process_sequential
          output = _summarize_tile(item)
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 1038, in _summarize_tile
          result = summarizer.work()
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/worker.py", line 135, in work
          result = self.processing_function(
          File "/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg.py", line 587, in _process_block_summary
          a_lc_trans_lc_deg = calc_lc_trans(
          File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/dispatcher.py", line 418, in _compile_for_args
          error_rewrite(e, 'unsupported_error')
          File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/dispatcher.py", line 358, in error_rewrite
          reraise(type(e), e, None)
          File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/utils.py", line 80, in reraise
          raise value.with_traceback(tb)
         numba.core.errors.UnsupportedError: Failed in nopython mode pipeline (step: analyzing bytecode)
         Use of unsupported opcode (IS_OP) found
         
         File "Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/te_algorithms/gdal/land_deg/land_deg_numba.py", line 183:
         def calc_lc_trans(lc_bl, lc_tg, multiplier, recode_from=None, recode_to=None):
          
          # raw integer codes to ordinal values prior to calculating transitions
          if recode_from is not None and recode_to is not None:
          ^
         
         
         
         
         
         Python版本: 3.9.5 (default, Sep 10 2021, 16:18:19) 
         [Clang 12.0.5 (clang-1205.0.22.11)]
         
         
         QGIS版本: 3.28.14-Firenze Firenze, b09131c5125
         
         
         Python路径:
         
         /Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LDMP/ext-libs/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/Applications/QGIS-LTR.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-LTR.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/lib-dynload/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python39.zip/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg/Users/zhaojingdong/Library/Application Support/QGIS/QGIS3/profiles/default/python

@MrShuaiB1
Copy link
Author

I had the same situation on both computers, and I switched between different versions of Qgis, which didn't work. I hope developers can help me, thank you very much. Whether I choose shp file or locale, it's the same result, it doesn't work, but there's no problem when calculating sub_indicators.

@Winter-Chou
Copy link

你这个问题解决了吗?能联系一下你吗?

@MrShuaiB1
Copy link
Author

MrShuaiB1 commented Jul 26, 2024 via email

@Winter-Chou
Copy link

Winter-Chou commented Jul 26, 2024 via email

@MrShuaiB1
Copy link
Author

MrShuaiB1 commented Jul 26, 2024 via email

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

2 participants