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

qgis_process is not showing algorithm providers installed via a python plugin #41120

Closed
janzandr opened this issue Jan 21, 2021 · 11 comments · Fixed by #47258
Closed

qgis_process is not showing algorithm providers installed via a python plugin #41120

janzandr opened this issue Jan 21, 2021 · 11 comments · Fixed by #47258
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@janzandr
Copy link

Describe the bug

I installed and activated a python plugin that provides a processing algorithms (e.g. "Append Features to Layer" plugin).

image

When running "qgis_process plugins" from OSGeo4W shell, the new provider is not found:
image

I also tried to run the command from within QGIS Python Console, but that gives the same result:

image

@janzandr janzandr added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 21, 2021
@Gustry
Copy link
Contributor

Gustry commented Jan 21, 2021

You should report to the plugin author and add the flag hasProcessingProvider in the metadata.txt and it should work.
https://docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata-table

And the initProcessing I think.
https://docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/processing.html#updating-a-plugin

Reopen if it's not working.

@Gustry Gustry closed this as completed Jan 21, 2021
@janzandr
Copy link
Author

I added the hasProcessingProvider=True to metadata.txt, but that didn't solved the problem.

Here is a minimalistic plugin that implements a processing provider with one algorithm:
image

I installed the plugin via Install from ZIP and activated it, but qgis_process is still not listing it. Maybe I miss an important detail. Thanks for your support!

dummyplugin.zip

@Gustry
Copy link
Contributor

Gustry commented Jan 22, 2021

You should follow the second link. You are missing the initProcessing. Can you try again ?

@janzandr
Copy link
Author

I fixed that, but still not working. Here is the updated plugin:

dummyplugin.zip

@Gustry
Copy link
Contributor

Gustry commented Jan 22, 2021

Reopening in the meantime.
Because it should work. I have already adapted plugins a few weeks ago.

@Gustry Gustry reopened this Jan 22, 2021
@Gustry
Copy link
Contributor

Gustry commented Jan 22, 2021

Put yes instead of True. It's working.
Like mentioned https://docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/processing.html#updating-a-plugin
Agreed, it should work as well.

The table should be updated : https://docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata-table

@janzandr
Copy link
Author

It worked, thanks a lot.

@gacarrillor
Copy link
Member

You should report to the plugin author and add the flag hasProcessingProvider in the metadata.txt and it should work.
https://docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata-table

I'm with @Gustry here.
Not only fix your local copy of the plugin, but also contact the plugin author (for the example you gave, Append Features to Layer, it happens to be me :) ).

A PR will be much appreciated 👍

@janzandr
Copy link
Author

I edited the metadata and the plugin and created PR.

@DelazJ
Copy link
Contributor

DelazJ commented Jul 13, 2021

Put yes instead of True.

@Gustry Maybe hasProcessingProvider should allow True/False (like the other parameters in the metadata file)? Unlike https://github.com/qgis/QGIS-Documentation/pull/3517/files#r264070345 I failed to have true or True work on a local plugin( ie being recognized by qgis_process -not aware of any other tool this parameter is meant to be used with). Or do we need to align the docs?

@gioman gioman added Processing Relating to QGIS Processing framework or individual Processing algorithms Feedback Waiting on the submitter for answers labels Jul 13, 2021
@Gustry Gustry removed the Feedback Waiting on the submitter for answers label Jul 13, 2021
@Gustry
Copy link
Contributor

Gustry commented Jul 13, 2021

The bug is still valid @gioman so I remove feedback.

Either we need to update to documentation, or indeed it would be better to upgrade QGIS core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants