'Can't reach a document with PyScript
I want to reach a document, but I always get this error:
FileNotFoundError: [Errno 44] No such file or directory: 'dbs/school/students.ini' )
I've tried putting "/" or "./" before the dbs, but it doesn't work, so I want to know how can I reach that document, the dbs folder is in the same directory where I run the html. The code I'm using works in python so I don't know why it doesn't work in PyScript
Solution 1:[1]
i had the same issue, the solution i found was to insert my file into a github public branch and get the link from my github file, the code is below:
from pyodide.http import open_url
url_content = open_url('https://raw.githubusercontent.com/')
to know more about it read
https://pyodide.org/en/stable/usage/faq.html
and see the videos from 1littlecoder about pyscript
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | gloo |
