openlibhums / openlibhums/janeway

ModuleNotFoundError prevents new journal creation if any plugin does not have plugin_settings

Open Beginner friendly
#5,434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Priority high
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Bug

If a plugin does not have plugin_settings.py, it prevents the Janeway press manager from setting up new journals after they are created. The journal is created but has no IssueType and potentially is missing other items.

https://github.com/openlibhums/janeway/blob/3f684c57a7a64f7cd44b8b1501b9cacefac997e0/src/press/views.py#L165-L184

Solution

I believe this is because an ImportError is expected during plugin installation, but a ModuleNotFoundError is being raised. Changing this line to catch both types fixes the problem:

https://github.com/openlibhums/janeway/blob/3f684c57a7a64f7cd44b8b1501b9cacefac997e0/src/core/logic.py#L907-L928

Versions

  • Janeway r-1.8.x
  • Python 3.11

To reproduce

  1. Install the file_editor plugin
  2. Navigate to the press manager / dashboard

Contributor guide

Open the contributing guide

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.

Research direction

Start with src/core/logic.py around lines 907-928 and the journal setup flow in src/press/views.py around lines 165-184. Reproduce with the file_editor plugin on Python 3.11, then verify that creating a journal completes its setup, including IssueType, when a plugin lacks plugin_settings.py.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.