Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

394
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!