Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tolerate errors in loading unused plugins

Open
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start by tracing plugin registration and CLI option parsing, especially how plugin-specific options such as --logger-mylogger-option are registered and processed. Define how failed unused plugins are recorded and warned about, then verify that selecting a failed plugin produces an informative error while unrelated execution continues.

Written by the indexing model from the issue text.

Description

In general I don't think that errors in loading plugins should prevent Snakemake from executing if that plugin is not used.

I think a good alternative would be to catch general exceptions in plugin code during registration (such as when importing the plugin module), log a warning instead, and store the information that loading the plugin failed. Then if the plugin is actually used Snakemake could fail with an informative error message (possibly printing the original stack trace).

Note that this would probably require special error handling around CLI option parsing - if plugin-specific options are specified, e.g. snakemake --logger mylogger --logger-mylogger-option foo, and an error occurred in loading the mylogger plugin, its settings won't be registered and the --logger-mylogger-option option won't be recognized. This will raise an exception before --logger mylogger is even processed. It should be easy to catch the error, figure out the registry and plugin name, and display the plugin load error if it exists.

I'd be happy to contribute a PR for this.

Dominant language
Python
Stars
0
Forks
7
Avg merge
13m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from snakemake/snakemake-interface-common

All issues in snakemake/snakemake-interface-common

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.