Reputation: 29
I am doing some R&D on pyodide js and getting some issue while implementing it on my local system ..
That is the console error that i am getting on my browser.. pls suggest how to resolve this ..
pyodide.js:309 GET http://localhost:9090/pyodide.asm.wasm 404 (File not found) index.html:1 Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok pyodide.js:85 GET http://localhost:9090/pyodide.asm.data.js net::ERR_ABORTED 404 (File not found)
Upvotes: 0
Views: 1671
Reputation: 1
I had a similar case as yours, the 404 error for pyodide.asm.data file. And my solution is to add support for .data extension in MIME type of IIS. For your case, please check whether .wasm extension is supportted in MIME type. enter image description here
Upvotes: 0
Reputation: 2945
I assume, you started your local server, where you store pyodide.js
. You also need to upload to your server any packages you intend to use. See also this section of the documentation.
If you want to load pyodide.js
from a source other than the official CDN, you have to set the base Plugin URL before including the Pyodide as follows:
<script type="text/javascript">
// default pyodide files URL (packages.json, pyodide.asm.data etc)
window.languagePluginUrl = 'https://pyodide-cdn2.iodide.io/v0.15.0/full/';
</script>
<script src="https://pyodide-cdn2.iodide.io/v0.15.0/full/pyodide.js"></script>
Check out my tutorial on it.
Upvotes: 1