@@ -1084,7 +1084,9 @@ await micropip.install(["sigima", "guidata"])
10841084 }
10851085 return value ;
10861086 } catch ( err ) {
1087- console . error ( `[runtime] ${ name } failed` , err ) ;
1087+ if ( ! options . silent ) {
1088+ console . error ( `[runtime] ${ name } failed` , err ) ;
1089+ }
10881090 throw err ;
10891091 } finally {
10901092 fn . destroy ?.( ) ;
@@ -1587,17 +1589,27 @@ await micropip.install(["sigima", "guidata"])
15871589 }
15881590
15891591 /** Load *bytes* (a DataLab-compatible HDF5 workspace) into the model.
1590- * When *replace* is true (default), the current model is wiped first. */
1592+ * When *replace* is true (default), the current model is wiped first.
1593+ *
1594+ * Pass ``silent: true`` when the caller probes whether a file is a
1595+ * workspace and intends to fall back to plain HDF5 import; in that
1596+ * case the expected ``Not a DataLab HDF5 workspace`` Python error
1597+ * should not be logged as a runtime error. */
15911598 async openWorkspaceHdf5 (
15921599 filename : string ,
15931600 bytes : Uint8Array ,
15941601 replace : boolean = true ,
1602+ options : { silent ?: boolean } = { } ,
15951603 ) : Promise < WorkspaceLoadResult > {
1596- return ( await this . callPy ( "open_workspace_from_bytes" , {
1597- filename,
1598- data : bytes ,
1599- replace,
1600- } ) ) as WorkspaceLoadResult ;
1604+ return ( await this . callPy (
1605+ "open_workspace_from_bytes" ,
1606+ {
1607+ filename,
1608+ data : bytes ,
1609+ replace,
1610+ } ,
1611+ { silent : options . silent } ,
1612+ ) ) as WorkspaceLoadResult ;
16011613 }
16021614
16031615 // ------------------------------------------------------------------
0 commit comments