Skip to content
This repository was archived by the owner on Jan 12, 2025. It is now read-only.
This repository was archived by the owner on Jan 12, 2025. It is now read-only.

Unable to install IfcOpenShell WASM #10

@Michele-x98

Description

@Michele-x98

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:

const { loadPyodide } = require("pyodide");
const initPyodide = async (code) => {
  const pyodide = await loadPyodide({
    indexURL : "https://cdn.jsdelivr.net/pyodide/v0.23.4/full/",
  });

  await pyodide.loadPackage("micropip");
  const micropip = await pyodide.pyimport("micropip");
  await micropip.install('../IfcOpenShell-0.7.0-py3-none-any.whl');
  console.log(await pyodide.runPython(`
            import ifcopenshell
            ifcopenshell.version`));

  return "IfcOpenShell loaded";
}

Everything works fine until the

 await micropip.install('../IfcOpenShell-0.7.0-py3-none-any.whl'); 

line, where an exception is thrown:

Screenshot 2023-09-01 at 07 29 59

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions