Skip to content

Commit

Permalink
Fix try/except in from_reference shadowing MissingDependencyException (
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash authored Oct 9, 2024
1 parent c87e399 commit 7ac2ae1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dlt/extract/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
pipeline_state,
)
from dlt.common.utils import graph_find_scc_nodes, flatten_list_or_items, graph_edges_to_nodes
from dlt.common.exceptions import MissingDependencyException

from dlt.extract.items import TDecompositionStrategy
from dlt.extract.pipe_iterator import ManagedPipeIterator
Expand Down Expand Up @@ -601,6 +602,8 @@ def from_reference(cls, ref: str) -> SourceFactory[Any, DltSource]:
return factory # type: ignore[no-any-return]
else:
raise ValueError(f"{attr_name} in {module_path} is of type {type(factory)}")
except MissingDependencyException:
raise
except ModuleNotFoundError:
# raise regular exception later
pass
Expand Down

0 comments on commit 7ac2ae1

Please sign in to comment.