pyscript-local-runtime icon indicating copy to clipboard operation
pyscript-local-runtime copied to clipboard

Unable to load the extension on Chrome

Open ayushjain01 opened this issue 2 years ago • 4 comments

I've been working on a project and came across your repository. I tried running it but encountered an error. Could you please assist me with this issue?

Here's the error I'm stuck at:

Uncaught (in promise) TypeError: Failed to resolve module specifier 'runtime/pyodide.js'
    at PyScriptApp._startInterpreter_main (pyscript.js:29022:7)
    at PyScriptApp.loadInterpreter (pyscript.js:29048:49)
    at PyScriptApp._realMain (pyscript.js:28972:18)
    at async PyScriptApp.main (pyscript.js:28940:9)

To provide more context, I've attached a screenshot of the error message: image

I appreciate your help in resolving this issue. Thank you!

ayushjain01 avatar Jul 11 '23 11:07 ayushjain01

Sorry - PyScript continues to evolve and I don't have time to keep up or maintain this. Very happy for other contributors to get involved though.

PFython avatar Jul 12 '23 11:07 PFython

I've been working on a project and came across your repository. I tried running it but encountered an error. Could you please assist me with this issue?

Here's the error I'm stuck at:

Uncaught (in promise) TypeError: Failed to resolve module specifier 'runtime/pyodide.js'
    at PyScriptApp._startInterpreter_main (pyscript.js:29022:7)
    at PyScriptApp.loadInterpreter (pyscript.js:29048:49)
    at PyScriptApp._realMain (pyscript.js:28972:18)
    at async PyScriptApp.main (pyscript.js:28940:9)

To provide more context, I've attached a screenshot of the error message: image

I appreciate your help in resolving this issue. Thank you!

The issue you are facing is simple. There is no runtime directory in the project. It has been renamed to interpreter. So cd into interpreter and then run the setup file. it should work.

rajatmohan22 avatar Jul 12 '23 14:07 rajatmohan22

Hi @rajatmohan22,

Thanks for your response. I'm aware that the runtime directory was renamed in the latest commit. In fact, I was working with the specific commit b68d9a1

However, despite these changes, I'm still encountering the same error. I've attached a screenshot of the error for reference:

Error Screenshot

ayushjain01 avatar Jul 12 '23 15:07 ayushjain01

There seems to be a problem with importing the pyodide.js file in the _startInterpreter_main function based on the given interpreter URL. One way to solve it is to change the failing line from await import(interpreterURL); to await import('./pyodide.js');. The problem seems to be specifically with the URL not starting with "./".

SamuelPavlik avatar Aug 05 '23 11:08 SamuelPavlik