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

Improve the logic behind importing a module #335

Merged
merged 6 commits into from
Oct 6, 2022
Merged

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Sep 27, 2022

When a module was not installed, it would raise a very ambiguous error message:

Source component specification declared unknown type 'intake'.

This is because the __import__ did not look if the import error was caused by the actually import or one of a dependency inside the file imported.

When failing, the error message could be improved, but I want some feedback on if this is the way forward.

@hoxbro hoxbro changed the title Import error module Improve the logic behind importing a module Sep 27, 2022
lumen/base.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #335 (e0f0e7a) into master (da69f51) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
- Coverage   67.25%   67.24%   -0.02%     
==========================================
  Files          71       71              
  Lines        7370     7373       +3     
==========================================
+ Hits         4957     4958       +1     
- Misses       2413     2415       +2     
Impacted Files Coverage Δ
lumen/base.py 83.20% <66.66%> (-0.61%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr philippjfr merged commit 73543d0 into master Oct 6, 2022
@philippjfr philippjfr deleted the import_error_module branch October 6, 2022 12:27
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants