Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

395
Vistas
Use imports in pyscript

I have wirtten some lines in python and want to integrate them into my website. As soon as I want to use them I recieve an error-message stating that the module can't be found:

JsException(PythonError: Traceback (most recent call last): File "/lib/python3.10/site-packages/_pyodide/_base.py", line 429, 
in eval_code .run(globals, locals) File "/lib/python3.10/site-packages/_pyodide/_base.py", 
line 300, in run coroutine = eval(self.code, globals, locals) File "", line 1, 
in ModuleNotFoundError: No module named 'theblockchainapi' )

The html is very basic:

<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
    <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<title>Document</title>

</head>
<body>
    <div>
        <input type="text" id = "address"> <br>
       <button id="button">Verify NFT</button>
        <div id="out">none</div>
    </div>
</body>
</html>
<py-env>
- theblockchainapi 
</py-env>
<py-script> 
from theblockchainapi import SolanaAPIResource, SolanaNetwork
</py-script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The package theblockchainapi requires the SSL module. The SSL modules, along with requests are not supported in web browsers. This is a security limitation for all browser applications and not just PyScript.

The solution will require modifying theblocckchainapi package to use supported browser APIs.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda