Closed Code4SAFrankie closed 4 months ago
I'm able to reproduce that error if I remove "beautifulsoup4" from the config file's packages section.
Could it be that the pyscript.json file is cached or you're pointing to a different one? You can see the actual working example here, so presumably it works: https://kkinder.pyscriptapps.com/puepy-tutorial/latest/tutorial/08_libraries/index.html
Changed to this error when renaming config file to avoid caching (your example url works though):
Cookie “__cf_bm” will soon be rejected because it is foreign and does not have the “Partitioned“ attribute. 2 [core.css](https://pyscript.net/releases/2024.6.2/core.css)
Installing beautifulsoup4 (latest) from https://micropython.org/pi/v2 to /lib [_io.js:31:20](https://pyscript.net/releases/node_modules/polyscript/esm/interpreter/_io.js)
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help https://xhr.spec.whatwg.org/#sync-warning [micropython.mjs:1:75261](https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@1.24.0-preview-47/micropython.mjs)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://micropython.org/pi/v2/package/py/beautifulsoup4/latest.json. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.
Uncaught (in promise) DOMException: A network error occurred.
call1 micropython.mjs:1
invoke_iiii micropython.mjs:1
invoke_iiii micropython.mjs:1
invoke_iiiii micropython.mjs:1
invoke_iiiii micropython.mjs:1
invoke_iiiii micropython.mjs:1
invoke_iiiii micropython.mjs:1
createExportWrapper micropython.mjs:1
ccall micropython.mjs:1
obj [micropython.mjs:1](https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@1.24.0-preview-47/micropython.mjs)
obj micropython.mjs:1
nt micropython.js:121
micropython.mjs:1
Sorry got it to work after the caching fix. Also had mpy instead of py.
The tutorial https://docs.puepy.dev/pypi-libraries.html#pypi-libraries-when-using-cpython-pyodide gives this error:
pyscript.json:
index.html: