Skip to content

Fix: Expand runner/core import errors#29

Closed
nulinspiratie wants to merge 1 commit intomainfrom
fix/expand-import-error
Closed

Fix: Expand runner/core import errors#29
nulinspiratie wants to merge 1 commit intomainfrom
fix/expand-import-error

Conversation

@nulinspiratie
Copy link
Copy Markdown
Contributor

Currently if the import of runner/core fails, the traceback is shown but the actual error isn't shown. This PR fixes that.

@nulinspiratie nulinspiratie self-assigned this Jan 7, 2025
@nulinspiratie
Copy link
Copy Markdown
Contributor Author

@maxim-v4s can you review?

Copy link
Copy Markdown
Collaborator

@maxim-v4s maxim-v4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note: It's a little strange that CI wasn't triggered.

In my POV it's a redundant to show original error. raise from contains all info about issue cause. If you think that really needed to have this then it's needed to fix next 2 comments.

uvicorn.run(
"qualibrate_composite.app:app", port=port, host=host, reload=reload
)
uvicorn.run("qualibrate_composite.app:app", port=port, host=host, reload=reload)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long.
80 symbols max with leading padding spaces.

raise ImportError(
"Can't import qualibrate_runner instance. "
"Check that you have installed it."
f"Can't import qualibrate_runner instance. "
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f should be used only before strings with templates.
So correct:

raise ImportError(
    "Can't import qualibrate_runner instance. "
    f"Check that you have installed it. Original error: {ex}"
)

@natangqm natangqm closed this Mar 1, 2026
@shaysqm shaysqm deleted the fix/expand-import-error branch March 18, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants