r/PyScript • u/manatlan • May 18 '22
pyscript/js refuse to load/start, in my wan
Don't know if it's due to recent changes in "/alpha/pyscript.js" ... or if it's our corporate proxy (bluecoat) which don't like urls ending with ".py" since some days...
I can't run any pyscript examples anymore ;-(
Here is the console.log of my chrome ...
Any tips to bypass this ?
loading pyscript...
pys.html:1 Access to fetch at 'https://pyscript.net/alpha/pyscript.py' from origin 'http://localhost:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
interpreter.ts:24 GET https://pyscript.net/alpha/pyscript.py net::ERR_FAILED 302
loadInterpreter @ interpreter.ts:24
await in loadInterpreter (async)
initialize @ pyconfig.ts:51
(anonymous) @ pyconfig.ts:130
load (async)
loadRuntimes @ pyconfig.ts:129
connectedCallback @ pyconfig.ts:113
(anonymous) @ main.ts:27
(anonymous) @ main.ts:35
utils.ts:56 Caught an error in loadPaths:
TypeError: Failed to fetch
handleFetchError @ utils.ts:56
loadInterpreter @ interpreter.ts:28
await in loadInterpreter (async)
initialize @ pyconfig.ts:51
(anonymous) @ pyconfig.ts:130
load (async)
loadRuntimes @ pyconfig.ts:129
connectedCallback @ pyconfig.ts:113
(anonymous) @ main.ts:27
(anonymous) @ main.ts:35
interpreter.ts:30 done setting up environment
pyenv.ts:10 RUNTIME READY
pyscript.ts:148 Collecting nodes to be mounted into python namespace...
interpreter.ts:36 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'install')
at loadPackage (interpreter.ts:36:24)
at loadEnv (pyenv.ts:42:19)
at PyodideRuntime.initialize (pyconfig.ts:69:19)
View all comments
Show parent comment
1
u/manatlan May 18 '22 edited May 18 '22
I will try to post a screenshot tomorrow...
But the 302, redirect to a bluecoat page, which warn about py file, and ask the user, if he really wants to do the GET ... And accept the responsability ...
But for sure it breaks the process ;-(