3liz/QuickOSM

"qgis:checkvalidity" procesing algorithm not found

Sjw-spec opened this issue · 22 comments

What is the bug?

Include some logs here, in QGIS Logs panel, bottom right icon, the small bubbles, in the QuickOSM tab.
            2021-09-28T12:52:43     INFO    All OSM objects with the key 'highway' in the canvas or layer extent are going to be downloaded.

2021-09-28T12:52:43 INFO Query: highway
2021-09-28T12:52:43 INFO Encoded URL: https://lz4.overpass-api.de/api/interpreter?data=[out:xml] [timeout:25];%0A(%0A node%22highway%22;%0A way%22highway%22;%0A relation%22highway%22;%0A);%0A(._;%3E;);%0Aout body;&info=QgisQuickOSMPlugin
2021-09-28T12:52:52 INFO Request completed
2021-09-28T12:52:52 INFO Checking OSM file content C:/Users/HP/AppData/Local/Temp/request-fAUDEI.osm
2021-09-28T12:52:52 INFO The OSM file is: C:/Users/HP/AppData/Local/Temp/request-fAUDEI.osm
2021-09-28T12:52:53 CRITICAL A critical error occurred, this is the traceback:
2021-09-28T12:52:53 CRITICAL
2021-09-28T12:52:53 CRITICAL base_processing_panel.py
2021-09-28T12:52:53 CRITICAL Error: Algorithm qgis:checkvalidity not found

2021-09-28T12:52:53 CRITICAL File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\base_processing_panel.py", line 47, in run
self._run()

          File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\quick_query_panel.py", line 423, in _run
          num_layers = process_quick_query(
         
          File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 318, in process_quick_query
          return process_query(
         
          File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 257, in process_query
          return open_file(
         
          File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 106, in open_file
          layers = osm_parser.processing_parse()
         
          File "C:\Users/HP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\parser\osm_parser.py", line 133, in processing_parse
          validity = processing.run(
         
          File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\tools\general.py", line 108, in run
          return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
         
          File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\core\Processing.py", line 156, in runAlgorithm
          raise QgsProcessingException(msg)

Environment

  • QuickOSM version: Licence GPL Version 2
  • QGIS version: 3.20.3-Odense
  • OS: Windows 10

Can you write "validity" in your processing toolbox ?

What is the ID of the algorithm "Check validity" ?
ksnip_20210928-141901

Hi, It's working again now. In trying to figure out the algorithm Id, I run the Check Validity, not sure if that had anything to do😅 Thank you for your help. Fingers crossed it's back to normal.

I will still make a test for that. You are not the first one.

If you need any more information from my side, just let me know.

Message on #364

I had the same issue and I think the solution is to change your language settings to American English.

Hi, I'm having the same issue.. Once checking validity, what I have to do to fix it ? Thanks

I mean do you have the algorithm ?
I still don't understand why the algorithm is not there on some QGIS. And a reboot of QGIS will add again the check validity algorithm it seems.

I have been trying to run a query that I have previously had no problem running at all and have run into this error every time.
Here are my system specs and whatnot:

QGIS version | 3.22.4-Białowieża QGIS code revision 3f4577ce6e
Qt version | 5.14.2
Python version | 3.8.7
GDAL/OGR version | 3.2.1
PROJ version | 6.3.2
EPSG Registry database version | v9.8.6 (2020-01-22)
GEOS version | 3.9.1-CAPI-1.14.2
SQLite version | 3.31.1
PostgreSQL client version | 12.3
SpatiaLite version | 4.3.0a
QWT version | 6.1.4
QScintilla2 version | 2.11.4
OS version | macOS 11.0

Active Python plugins
DigitizingTools | 1.5.1
QuickOSM | 2.0.1
quick_map_services | 0.19.29
usgs_stream_mapper | 0.2
sagaprovider | 2.12.99
grassprovider | 2.12.99
db_manager | 0.1.20
MetaSearch | 0.3.5

And this is the dialogue from the QuickOSM Panel

2022-03-19T18:47:06     INFO    All OSM objects with the key 'natural'='water' in the canvas or layer extent are going to be downloaded.
2022-03-19T18:47:06     INFO    Query: natural_water
2022-03-19T18:47:06     INFO    Encoded URL: https://lz4.overpass-api.de/api/interpreter?data=[out:xml] [timeout:25];%0A(%0A node[%22natural%22%3D%22water%22]( 27.49988,-82.45185,27.55754,-82.35723);%0A way[%22natural%22%3D%22water%22]( 27.49988,-82.45185,27.55754,-82.35723);%0A relation[%22natural%22%3D%22water%22]( 27.49988,-82.45185,27.55754,-82.35723);%0A);%0A(._;%3E;);%0Aout body;&info=QgisQuickOSMPlugin
2022-03-19T18:47:09     INFO    Request completed
2022-03-19T18:47:09     INFO    Checking OSM file content /private/var/folders/8s/cldnh_0n2wx39hw880qwh0lh0000gp/T/request-tNoEkc.osm
2022-03-19T18:47:09     INFO    The OSM file is: /private/var/folders/8s/cldnh_0n2wx39hw880qwh0lh0000gp/T/request-tNoEkc.osm
2022-03-19T18:47:09     CRITICAL   A critical error occurred, this is the traceback:
2022-03-19T18:47:09     CRITICAL    
2022-03-19T18:47:09     CRITICAL    base_processing_panel.py
2022-03-19T18:47:09     CRITICAL    Error: Algorithm qgis:checkvalidity not found
             
2022-03-19T18:47:09     CRITICAL     File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/ui/base_processing_panel.py", line 47, in run
              self._run()
             
              File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/ui/quick_query_panel.py", line 423, in _run
              num_layers = process_quick_query(
             
              File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/core/process.py", line 318, in process_quick_query
              return process_query(
             
              File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/core/process.py", line 257, in process_query
              return open_file(
             
              File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/core/process.py", line 106, in open_file
              layers = osm_parser.processing_parse()
             
              File "/Users/Cecilia1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/core/parser/osm_parser.py", line 133, in processing_parse
              validity = processing.run(
             
              File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 108, in run
              return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
             
              File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 171, in runAlgorithm
              raise QgsProcessingException(msg)

Finally:
The Processing panel shows this dialogue each time I try a query.

Error: Algorithm qgis:checkvalidity not found

I do not know how to access the processing toolbox in this recent version so any help would be appreciated

According to feedbacks on this ticket, I still don't know why the Processing algorithm was not found among some users.
It's a native algorithm from QGIS.

In the meantime, QuickOSM will just check if the algorithm exists in Processing before launching it.
8781912

The quickosm plugin give this error if the "processing" plugin is not activate (selected) in the plugins list

Ah yes ... thanks for the feedback.

Processing is required now to run QuickOSM. It will call some QGIS native algorithms, such as Explode HStore, Refactor fields, Check validity ...

So QuickOSM must check that Processing is enabled.

Even disabling the Processing plugin, restarting QGIS, checking that Processing is well disabled, I can still call Processing algorithm :

QgsApplication.processingRegistry().algorithmById("native:buffer")

in the Python console, it works well. I still couldn't replicate the issue.

I'm having the same problem now that I upgraded.

2024-02-03T21:20:12     INFO    The OSM file is: /private/var/folders/gc/jc7x6vkj263402rpnngzrxdm0000gn/T/request-CgBkOm.osm
2024-02-03T21:20:12     CRITICAL    A critical error occurred, this is the traceback:
2024-02-03T21:20:12     CRITICAL    
2024-02-03T21:20:12     CRITICAL    base_processing_panel.py
2024-02-03T21:20:12     CRITICAL    Error: Algorithm qgis:checkvalidity not found

I looked for the 'processing' plugin, it was disabled. I enabled it but got this message in Plugins log and it was automatically disabled again:

2024-02-03T21:55:12 WARNING Plugin "processing" is not compatible with this version of QGIS. It will be disabled.

Okay, I found the solution here:

https://gis.stackexchange.com/questions/307570/plugin-processing-does-not-work-not-possible-to-enable-qgis-3-4-3-madeira

When upgrading, before installing the new version, you must delete your default profile folder, otherwise this will not be updated in the install. This folder includes such things as the core "processing" plugin, and it won't be updated if the folder already exists (somebody should probably do something about that for when we want to upgrade).

If you don't want to lose your presets, etc., rename the folder to something such as "default (old)" rather than deleting it, and you can copy over your Query presets, Query history, fonts, themes, palettes, etc.

in mac os the folder is here:
Library/Application Support/QGIS/QGIS3/profiles/default

in windows it is here:
AppData\Roaming\QGIS\QGIS3\profiles\default

in linux it is here:
.local/share/QGIS/QGIS3/profiles/default

info source: https://plugins.qgis.org/planet/tag/qgis3/

Darn, everything has been working fine after I did the above; delete default profile folder and reinstall. I have done hours of queries and edits etc.
Buuuut, just now I tried to perform another query, and the same kind of error has happened.

2024-02-04T17:48:58     CRITICAL    A critical error occurred, this is the traceback:
2024-02-04T17:48:58     CRITICAL    
2024-02-04T17:48:58     CRITICAL    base_processing_panel.py
2024-02-04T17:48:58     CRITICAL    Error: Algorithm qgis:checkvalidity not found
             
2024-02-04T17:48:58     CRITICAL     File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/QuickOSM/ui/base_processing_panel.py", line 59, in run_saved_query
              self._run_saved_query(data)

I checked the 'processing' plugin, and now I get the same error yet again:

2024-02-04T17:51:03     WARNING    Plugin "processing" is not compatible with this version of QGIS.
             It will be disabled.

It says the 'processing' plugin is version 2.12.99
mac os.
(file:///Applications/Other/QGIS.app/Contents/Resources/python/plugins/processing)

I tried creating a new user profile by selecting 'choose profile on startup' in the Profiles are of QGIS preferences/settings and restarting the app and choosing +new profile, made a new profile, installed the QuickOSM and QuickMapServices. Tried doing a basic Query (highway - unclassified, there's only one on my map) through QuickOSM and got an error.


GENERAL TAB

2024-02-04T19:34:00 WARNING Could not write to /Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/resources/i18n/


MESSAGES TAB

2024-02-04T19:41:27 CRITICAL Error in the QGIS log window, then the QuickOSM panel, copy/paste it and please report it, if you know how to copy/paste QGIS logs. Please check pinned tickets first.


QUICK OSM TAB

2024-02-04T19:34:00     INFO    Preset translations have been loaded and unzipped.
2024-02-04T19:41:26     INFO    All OSM objects with the key 'highway'='unclassified' in the canvas or layer extent are going to be downloaded.
2024-02-04T19:41:26     INFO    Query: highway_unclassified
2024-02-04T19:41:26     INFO    Encoded URL: https://overpass-api.de/api/interpreter?data=[out:xml] [timeout:25];%0A(%0A node[%22highway%22%3D%22unclassified%22]( 49.26353,-122.55162,49.27871,-122.52121);%0A way[%22highway%22%3D%22unclassified%22]( 49.26353,-122.55162,49.27871,-122.52121);%0A relation[%22highway%22%3D%22unclassified%22]( 49.26353,-122.55162,49.27871,-122.52121);%0A);%0A(._;%3E;);%0Aout body;&info=QgisQuickOSMPlugin
2024-02-04T19:41:27     INFO    Request completed
2024-02-04T19:41:27     INFO    Checking OSM file content /private/var/folders/gc/jc7x6vkj263402rpnngzrxdm0000gn/T/request-aDBhJP.osm
2024-02-04T19:41:27     INFO    The OSM file is: /private/var/folders/gc/jc7x6vkj263402rpnngzrxdm0000gn/T/request-aDBhJP.osm
2024-02-04T19:41:27     CRITICAL    A critical error occurred, this is the traceback:
2024-02-04T19:41:27     CRITICAL    
2024-02-04T19:41:27     CRITICAL    base_processing_panel.py
2024-02-04T19:41:27     CRITICAL    Error: Algorithm qgis:checkvalidity not found
             
2024-02-04T19:41:27     CRITICAL     File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/ui/base_processing_panel.py", line 47, in run
              self._run()
             
              File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/ui/quick_query_panel.py", line 421, in _run
              num_layers = process_quick_query(
             
              File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/core/process.py", line 318, in process_quick_query
              return process_query(
             
              File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/core/process.py", line 257, in process_query
              return open_file(
             
              File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/core/process.py", line 106, in open_file
              layers = osm_parser.processing_parse()
             
              File "/Users/username/Library/Application Support/QGIS/QGIS3/profiles/Profile001/python/plugins/QuickOSM/core/parser/osm_parser.py", line 147, in processing_parse
              validity = processing.run(
             
              File "/Applications/Other/QGIS [map making].app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 106, in run
              return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
             
              File "/Applications/Other/QGIS [map making].app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 158, in runAlgorithm
              raise QgsProcessingException(msg)

PROCESSING TAB

2024-02-04T19:41:27 CRITICAL Error: Algorithm qgis:checkvalidity not found


Again, if I disable then reenable the Processing plugin, I get this error:

2024-02-04T19:51:15     WARNING    Plugin "processing" is not compatible with this version of QGIS.
             It will be disabled.

Very odd, as it came bundled with the app as a core plugin.
Anyway, creating a new profile did not solve the problem.
I was able to temporarily solve the problem by deleting the
profile folder and reinstalling the entire app.
If I go into the app > Resources > python > plugins > processing
and look at the 'metadata.txt' file it says in this file:

"version=2.12.99"
"qgisMinimumVersion=3.0"

I am running 3.34.3-Prizren. So??? What the heck?

Gustry commented

It says the 'processing' plugin is version 2.12.99

I would say, this is now "normal", because Processing is now a core plugin since QGIS 3.0 and its version is not changed. Plugin is updated with QGIS source code. See the version hardcoded in QGIS https://github.com/qgis/QGIS/blob/master/python/plugins/processing/metadata.txt#L6

Starting a new QGIS profile, as soon as you are using some plugins, Processing get disabled ?

Can you identify when/why Processing get disabled ?

I would say, this is now "normal"

What is normal? The Error says that the Processing Plugin is not compatible with this version of QGIS, but it should be, it meets the minimum requirement.

Starting a new QGIS profile, as soon as you are using some plugins, Processing get disabled ?

It happens with the default QGIS profile. I tried making new profiles to see if that would solve the problem. It did nothing. I tried deleting the profile folder and reinstalling QGIS and that seemed to fix the problem, but eventually the error happened again.

I always use QGIS with QuickOSM and QuickMapServices. I haven't tried using QGIS without the plugins. I'd have to learn to import and query data without them to see if the QuickOSM or QuickMapServices plugin is the problem/trigger

Can you identify when/why Processing get disabled?

I can try deleting everything and reinstalling QGIS, if everything works fine again, I can try to see if there is some kind of 'trigger'. Instead of deleting the profile folder, I can try deleting everything related to QGIS before the reinstall.

That's all I can think of trying at the moment.

Gustry commented

What is normal? The Error says that the Processing Plugin is not compatible with this version of QGIS, but it should be, it meets the minimum requirement.

Look at my quote ;-) I was just quoting "'processing' plugin is version 2.12.99". That's the only thing normal.

Then indeed for now, I'm also clueless for now what is happening...

I looked at your quote. It's confusing English, but thanks for explaining.

  • I deleted the entire profile folder.
  • Deleted QGIS.
  • Did a complete reinstall.

Last time I did this, it seemed to fix the problem.
When I do a query with QuickOSM I get the same error. Processing plugin incompatible. Which is weird, because when I did a complete reinstall before, doing a query worked, I thought I solved the problem, then later the error happened again. But now, I get the error immediately with a complete reinstall.
Using macos13.6.3.

I don't know... maybe there are some hidden files somewhere that are the cause of the problem, or... it's a problem with this version. Super annoying.

I just tried downloading QGIS 3.28 LTR and seeing if using this version would 'fix' the problem. No, same error:

Plugin "processing" is not compatible with this version of QGIS.
It will be disabled.

Maybe I'll try an older version. Oh, crap, I forgot to delete the profile folder before installing. Damn, I might have screwed up my 'test'. #$%^!

I went back to a prior version from 2023-08-20, closer to the last update of the Processing Plugin, and it works fine! So, definitely something is fucked up with the newer versions and compatibility with Processing/QuickOSM/QGIS. At least for the mac version. I didn't have any problems until I updated to the newest version.

QGIS_ltr_final-3_28_10_20230819_180849

https://download.qgis.org/downloads/macos/ltr/

If I use this version, everything works as it should.