Commit b69dcd39 authored by Romain Casati's avatar Romain Casati
Browse files

Removing 'Unknown package 'basthon'' error.

parent 8d658070
......@@ -107,8 +107,14 @@
that.addEventListener("eval.request", that.evalFromEvent);
// get the version of Python from Python
that.pythonVersion = pyodide.runPython("import platform ; platform.python_version()");
return pyodide.loadPackage(that.basthonRoot + "/basthon-py/basthon.js").then(
() => pyodide.runPythonAsync("import basthon"));
// this is for avoiding "Unknown package 'basthon'" error
// but can be removed with 0.17.0 since it is fixed upstream
const consoleErrorBck = console.error;
console.error = () => {};
return pyodide.loadPackage(that.basthonRoot + "/basthon-py/basthon.js").then(() => {
pyodide.runPythonAsync("import basthon");
console.error = consoleErrorBck;
});
};
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment