Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

66
Visualizações
Pyodide languagePluginLoader is not defined

I have been using Pyodide to run some python in my website. It has been working up until recently, however now has begin giving this error,

Uncaught ReferenceError: languagePluginLoader is not defined
at 2347:162

Some searching has revealed that this method is deprecated in pyodide anyway

https://pyodide.org/en/stable/usage/api/js-api.html#globalThis.loadPyodide

and Insteasd of using languagePluginUrl I should use loadPyodide.

I have no idea how to do this, I know nothing of js, only python,

My code is...

<script type="text/javascript">
    languagePluginLoader.then(() => {
    pyodide.loadPackage(['numpy']).then(() => {
        pyodide.runPython(`   


    # My python code here


      `);
  });});

</script>

This used to work fine, so I think I just need to use the new method. Any help converting it to the new method appreciated - Thanks.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You're probably using a newer version of pyodide. Since 0.18.0, you should use loadPyodide with the pyodide base url instead, which gives the pyodide object in the callback:

const PYODIDE_BASE_URL = "https://cdn.jsdelivr.net/pyodide/v0.18.0/full"

loadPyodide({ indexURL: PYODIDE_BASE_URL }).then((pyodide) => {
  globalThis.pyodide = pyodide      // you might also want to store pyodide globally so 
                                    // so you can access anywhere in the scope
  pyodide.loadPackage(['numpy']).then(() => {
    pyodide.runPython(`   
    # My python code here
  `);
});});
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda