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

Loading errors from non-core plugins don't appear in the webapp log #1466

Closed
gonzalo-bulnes opened this issue Feb 9, 2024 · 0 comments · Fixed by #1467
Closed

Loading errors from non-core plugins don't appear in the webapp log #1466

gonzalo-bulnes opened this issue Feb 9, 2024 · 0 comments · Fixed by #1467

Comments

@gonzalo-bulnes
Copy link
Contributor

gonzalo-bulnes commented Feb 9, 2024

How did you install WebODM?

Docker, but it's not relevant to the issue.

What's your browser and operating system?

Not relevant to the issue.

What is the problem?

What happens

When loading a plugin that is not one of the "core" plugins causes an error, that error is not output to the log. Instead a somewhat generic error is logged, that can also be misleading because it refers to "core" plugins explicitly:

webapp      | WARNING Failed to instantiate plugin example: No module named 'coreplugins.example'

What would be better

webapp      | WARNING Failed to instantiate plugin example: No module named 'coreplugins.example': whatever the error was during previous attempts to load the plugin, if any

Relevant code

How can we reproduce this?

  1. Place a plugin in MEDIA_DIR/plugins, say example
  2. Make sure that plugin raises some exception, e.g. by adding raise BaseException("something went awfully wrong") in the __init__.py file of the plugin.
  3. Restart WebODM
  4. Look for Failed to instantiate plugin example: No module named 'coreplugins.example' and observe how nothing around tells you that something went awfully wrong. (Maybe wonder for a bit why coreplugins was involved, but that's a separate topic. 🙂)

Additional context

I came across this when trying to figure out if a cv2 import error was fixed in the context of this forum thread.

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

Successfully merging a pull request may close this issue.

1 participant