Skip to content

Commit

Permalink
fix: don't catch ImportError for mendeleev and dpdata
Browse files Browse the repository at this point in the history
Fix deepmodeling#3743. This will give users more clear error message than `NameError`.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Jun 14, 2024
1 parent c644314 commit e212c08
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions deepmd/utils/econf_embd.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
import numpy as np

try:
import dpdata
from mendeleev import (
element,
)
except ImportError:
pass

import dpdata
from mendeleev import (
element,
)

###
# made by command
Expand Down

0 comments on commit e212c08

Please sign in to comment.