As title mentioned, i write a simple html file based on pyscript. On my laptop, it works fast and excellent, but when i send this html file to my friends’ laptop without any related python env, it will always stay in loading condition for long time and can’t enter successfully, when i check it via DevTools, it shows this error, like that (my friend’s page):
So how can i solve it, besides i’m from CHN, is it associated with GFW?
This is my code:
<!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>
<py-env>
- numpy
- matplotlib
</py-env>
<style>
span{
color: blue;
}
</style>
</head>
<body style="margin: 25px 75px 25px 75px;">
<div class="p-5 text-center bg-light">
<p>Quick Draw by<a href="https://github.com/ELongking"> <span>Longking</span> </a></p>
<p><a href="https://github.com/pyscript/pyscript"><span>PyScript</span></a> is a very new framework, it needs a few seconds to load...</p>
<h3>If you want to use it again, you need to refresh the page</h3>
</div>
<div class="container1" id=prepare">
<p>Please enter your equation which is need to be drawn</p>
<input id="eq" type="text" style="width:300px" placeholder="y=2*x+sqrt(x) or z=x**2+y">
<br>
<p>Set the range of x coordinate</p>
<input id="ra" type="text" style="width:200px" placeholder="-5,5 or -5,5;-5,5">
<br>
<p>Save or not</p>
<input id="save" type="text" style="width:100px" placeholder="yes or no">
<br>
<button class="button" style="background-color: #00C0CB" type="button" id="file_select">Button -> Save directory</button>
<br>
</div>
<br>
<div class="container2" id="test-plot">
<button id="but" style="margin-top: 10px;margin-bottom: 10px;background-color: #FFC0CB;" type="button" pys-onClick="main">
Button -> Generate</button>
</div>
<py-script>
from numpy import *
from matplotlib import pyplot as plt, style as sty
import asyncio
from js import console, document, window, Blob
from pyodide import create_proxy, to_js
# main
</py-script>
</div>
</body>
</html>