File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
packages/pyodide-runtime-agent/src Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ async function initializePyodide(
8282 } ) ;
8383
8484 // Load Pyodide first without packages (more reliable in CI)
85+ self . postMessage ( {
86+ type : "log" ,
87+ data : "About to call loadPyodide()" ,
88+ } ) ;
89+
8590 pyodide = await loadPyodide ( {
8691 packageCacheDir,
8792 stdout : ( text : string ) => {
@@ -98,13 +103,30 @@ async function initializePyodide(
98103 } ,
99104 } ) ;
100105
106+ self . postMessage ( {
107+ type : "log" ,
108+ data : "loadPyodide() completed successfully" ,
109+ } ) ;
110+
101111 // Explicitly load packages after Pyodide is initialized
102112 self . postMessage ( {
103113 type : "log" ,
104- data : `Explicitly loading packages: ${ packagesForInit . join ( ", " ) } ` ,
114+ data : `About to explicitly load packages: ${ packagesForInit . join ( ", " ) } ` ,
105115 } ) ;
106116
107- await pyodide . loadPackage ( packagesForInit ) ;
117+ try {
118+ await pyodide . loadPackage ( packagesForInit ) ;
119+ self . postMessage ( {
120+ type : "log" ,
121+ data : `Successfully loaded packages: ${ packagesForInit . join ( ", " ) } ` ,
122+ } ) ;
123+ } catch ( error ) {
124+ self . postMessage ( {
125+ type : "log" ,
126+ data : `Failed to load packages: ${ error } ` ,
127+ } ) ;
128+ throw error ;
129+ }
108130
109131 // Set up interrupt buffer
110132 if ( interruptBuffer ) {
You can’t perform that action at this time.
0 commit comments