Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bec_ipython_client/bec_ipython_client/bec_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ def __repr__(self) -> str:
base = os.path.dirname(plugin["module"].__file__)
with open(os.path.join(base, "post_startup.py"), "r", encoding="utf-8") as file:
# pylint: disable=exec-used
exec(file.read())
try:
exec(file.read())
except Exception as exc:
logger.error(f"Error running `post startup` for plugin {name}: {exc}")

else:
bec._ip.prompts.status = 1

if not bec._hli_funcs:
bec.load_high_level_interface("bec_hli")

if _main_dict["startup_file"]:
with open(_main_dict["startup_file"], "r", encoding="utf-8") as file:
Expand Down
1 change: 1 addition & 0 deletions bec_lib/bec_lib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def start(self):
EventType.NAMESPACE_UPDATE, action="add", ns_objects=default_namespace
)
self.messaging = MessagingContainer(self.connector)
self.load_high_level_interface("bec_hli")
logger.info("Starting new client")
self.status = BECStatus.RUNNING
except redis.exceptions.ConnectionError:
Expand Down
Loading