-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install IfcOpenShell WASM #10
Comments
Just to give a little bit more of context to whoever will read it and maybe gain some useful suggestions, what I'm currently trying to do is create a web platform that is able to load an IFC file, render the 3D model and allow the end-user to enrich the model with IoT sensor, allowing also to see changes on Subsection of the IfcSensor element in real-time. I was trying to do it everything in Python using Streamlit as Web Framework, but due to some limitations, i decided to try this new approach. |
First thing I would imagine to try is to use the exact same pyodide version that we use in the example [0] as that is also the pyodide (and python interpreter version) used to compile the ifcopenshell native module. [0] https://github.com/IfcOpenShell/wasm-preview/blob/master/index.html#L77C1-L77C110 I must admit I would expect a different error if that's the issue. Maybe something else to look at is what server do you use and whether the wheel is correctly served as a binary file. (When you download the .whl from your server and rename it to .zip are you able to open it using your default utility to open an archive?) |
Thanks for the reply, i have updated both the cdn version to 0.22.0a1 and the pyodide npm package to the same version, still the same error. It's weird because using the example [0] https://github.com/IfcOpenShell/wasm-preview/blob/master/index.html#L77C1-L77C110 it works as expected, but using it inside a react component it fails while loading the ifcopenshell library. It also work the import of micropip: What do you mean for
I have downloaded the .whl file from this the repository, did i made a mistake or misunderstood something? |
The error is actually quite clear:
So that's what I meant to investigate. What if it's really not a zip file when served from your server due to how it's served by react dev server or due to some corruption when you initially download it or maybe you get a 404 because the file doesn't exist there locally. |
Hello, i'm using pyodide and ifcopenshell wasm inside a React application but i got an error while the installation of the WASM file.
I placed the WASM file inside the root folder of my application, and then inside the App.js file i initialise the pyodide using the relative npm package inside a function that is called during the first render of the React component:
Everything works fine until the
line, where an exception is thrown:
I'm quite new to WASM and so on, if someone could help me and explain what i'm doing wrong i would appreciate it a lot.
The text was updated successfully, but these errors were encountered: