You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by subframe7536 November 5, 2024
Here is my code, and it prompt: Failed to load Pyodide: TypeError: Failed to fetch dynamically imported module: https://esm.sh/[email protected]/pyodide.asm.js
<!doctype html><htmllang="en"><head><metacharset="UTF-8" />
<metaname="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pyodide Example with esm.sh</title><scripttype="module">// Load Pyodide from esm.shasyncfunctionloadPyodide(){// Import Pyodideconst{ loadPyodide }=awaitimport("https://esm.sh/[email protected]");constpyodide=awaitloadPyodide({indexURL: "https://esm.sh/[email protected]",});awaitpyodide.loadPackage("numpy");// Load your desired package herereturnpyodide;}// Using the loaded PyodideloadPyodide().then((pyodide)=>{// Example: Running a simple Python codeconstcode=`import numpy as npa = np.array([1, 2, 3])a.mean()`;constresult=pyodide.runPython(code);console.log(result);// Output the result to the console}).catch((err)=>{console.error("Failed to load Pyodide:",err);});</script></head><body><h1>Pyodide with ESM.sh</h1><p>Open the console to see the output.</p></body></html>
```</div>
The text was updated successfully, but these errors were encountered:
Discussed in #902
Originally posted by subframe7536 November 5, 2024
Here is my code, and it prompt:
Failed to load Pyodide: TypeError: Failed to fetch dynamically imported module: https://esm.sh/[email protected]/pyodide.asm.js
The text was updated successfully, but these errors were encountered: