New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a better error if <py-env> paths is used in a local HTML file #257
Comments
WORKAROUD
Now you can open http://0.0.0.0:8000 and select |
This error is also present whenever a library install requires additional file on the PYPI server. <html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
- msvcrt
</py-env>
</head>
<body>
<div id="test"></div>
<div id="test2"></div>
<py-script output="test2">
import msvcrt
print("keyboard OK")
</py-script>
</body>
</html> We additionally get a CORS error:
As well as a 301 error (CORS error) from |
Do we need to update the documentation since this is not expected to work
|
YES, it worked this way, localhost:8000/foo.html ( I mean I used this to do , using the server it loads the external script) |
I dont know why it says "The system cannot find the path specified." |
paths:
can only be used if the page is being served out of a webserver, but not out of an HTML page on the filesystem.This is for good reasons and it's related to #179, but currently py-script fails in a very obscure way and the page just looks broken to the user. This is the full traceback as seen in chrome's console:
We should intercept this error and show the user a clear message and a link to some documentation which explains the issue and how to solve/mitigate it.
There are many open issues which are all related to this problem, e.g.:
#220
#217
#221
The text was updated successfully, but these errors were encountered: