Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
73 views

I have a github repo that is hosted on GitHub Pages (project site). I’m migrating a small PyScript demo to GitHub Pages and hitting 404s when preloading files via <py-config>. This works locally ...
My Work's user avatar
  • 2,560
2 votes
3 answers
162 views

My code works as python file but I am struggling to make it work using pyscript.I am sharing the code which I tried. main.py import pytesseract pytesseract.pytesseract.tesseract_cmd = r"Tesseract-...
nasrin begum pathan's user avatar
1 vote
2 answers
79 views

I'm trying to add a python terminal onto a website using pyscript to run programs I've written using <script type="mpy" terminal worker src="subrepo/folder/program.py"></...
onomatopoeia's user avatar
0 votes
1 answer
60 views

This is the html code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-...
rashmip_21's user avatar
-3 votes
1 answer
78 views

I have just begun learning how to use python for web apps. I don't plan on using it but I was just curious and trying it. I'm trying to take student data like name,roll no, branch and course from html ...
stacker's user avatar
0 votes
0 answers
23 views

I am using pyscript and I have a directory structure as follows: index.html Classes/Class_A.py Classes/Class_B.py where Class_A contains a class A and Class_B contains a class B which inherits from A....
Nate Ackerman's user avatar
0 votes
1 answer
82 views

Should be pretty straight forward, but I keep getting this modulenotfound error. And it looks like every year they change the way to do it and deprecate all other ways. This is my index.html <!...
Alfonso Olvera Ventura's user avatar
0 votes
1 answer
49 views

I'm running the example code from the documentation for py:ready: <script> addEventListener("py:ready", () => { const status = document.getElementById("...
Mud's user avatar
  • 29.2k
1 vote
1 answer
52 views

I'm working on a Flask project where I need to send data from a PyScript (running in the browser) to the Flask backend using a POST request. However, when trying to make a POST request from the ...
lhy's user avatar
  • 31
0 votes
1 answer
65 views

from pyscript import document, window from pyscript.ffi import create_proxy class Canvas: def __init__(self, id, width=64*9, height=64*9): self.canvas = document.querySelector(id) ...
Michael's user avatar
  • 117
0 votes
1 answer
61 views

I'm using pyscript to run a function from an HTML page that reads an Excel file and returns the value from column two when column one is equal to a text input value on the HTML page. I want to ...
warrenjb's user avatar
0 votes
1 answer
115 views

I am confused about the use of the fetch() function in PyScript. There seems to be two versions of that function: from the js module from the pyscript module Only the first one seems to accept two ...
Peter M.'s user avatar
  • 948
0 votes
1 answer
88 views

I want to fetch json data with PyScript but cannot get over a pyodide.ffi.JsException: TypeError: NetworkError when attempting to fetch resource. It works with the sample data (the outcommented lines) ...
Peter M.'s user avatar
  • 948
0 votes
1 answer
142 views

I want to play an mp3 file using the HTML tag like so: <audio controls> <source id="player" src="sounds//ziege.mp3" type="audio/mpeg"> </...
Peter M.'s user avatar
  • 948
1 vote
1 answer
152 views

I am trying to connect to SQL server from Py script and I tried the same code of my jupyternotebook but the page shows blank after I import pyodbc. Is there any other way I connect to my SQL server ...
nasrin begum pathan's user avatar
0 votes
2 answers
525 views

I am running a very basic pyscript code that accesses a python file. The following is the HTML file: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-...
user2842122's user avatar
0 votes
0 answers
86 views

I create a pyd compiled python file of a function called sm that calculate the sum of two numbers (just to test the use of compiled python file). The compiled file name is somme.pyd To test I create ...
mlri's user avatar
  • 23
0 votes
1 answer
74 views

I'm new to Pyscript, I create an UI for password generation, yet the button is grayed out without clicking <!DOCTYPE html> <html lang="en"> <head> <title>...
Nguyen Thong's user avatar
0 votes
1 answer
89 views

I am learning python django web framework . Reading csv file content and showing in pandas dataframe but getting error file not found. Tried all possible options using latest , alpha pyscript release ....
Schaphekar's user avatar
1 vote
1 answer
238 views

I'm using PyScript to run a simple Python script in my HTML file to display a pandas DataFrame. However, after loading the page in browser and clicking the run button of the code block I'm ...
Leonard Alphonso's user avatar
2 votes
1 answer
186 views

I am making webpages in pyscript. When I add an iframe tag for an embeded youtube clip to an html that is hosted by pyscript.com, the html on a brower shows "www.youtube.com refused to connect.&...
Ausk Fullex's user avatar
0 votes
0 answers
131 views

I have a Pyscript page that searches a news archive and returns a list of news summaries. I want to then feed this list of summaries into gpt-4o and get back a brief summary of the material. The ...
Mark Bailey's user avatar
0 votes
1 answer
42 views

Here is my HTML code: <!DOCTYPE html> <html lang="en" class="light"> <head> <meta charset="UTF-8"> <meta name="viewport" ...
Sihan Pathiraja's user avatar
0 votes
1 answer
142 views

I have a Python file called main.py, which I want to run when a button is pressed in a website I am creating, but I'm unsure how to go about this. I have looked at several different examples on the ...
Joshua Carlson's user avatar
0 votes
1 answer
241 views

I am trying to write file in PyScript. Writing and reading is OK, but if I refresh the page, all changes are resetted. Can I make PyScript save specific file into localStorage? Like, /home/pyodide/...
user24521401's user avatar
0 votes
2 answers
149 views

i would like to implement pyscript in html code, for instance i want to generate chart output, here is my code : <!DOCTYPE html> <html lang="en"> <head> <meta ...
AI ML's user avatar
  • 71
0 votes
1 answer
108 views

I'm trying to create an extension that searches google and allows the user to access the first 10 or so results. I did the google search code in python and have the code for an extension but I don't ...
James Boland's user avatar
0 votes
1 answer
120 views

I'm new to programming so I don't know how on or off the mark I am but either way I'm stuck. I wanted to try making a webpage that uses a python script to scrape all the text from the html file of a ...
kimchiiboiii's user avatar
1 vote
1 answer
59 views

I had a chatbox in HTML created based on Javascript. Now I am trying to translate the Javascript code to Pyscript, to better streamline the data analytics tools. However, after the translation, the ...
codingDoraemon's user avatar
1 vote
1 answer
696 views

I need to use some files in my Pyscript algorithm, and I know Pyscript can´t access local files because of a security issue. But my question is, can I somehow upload those files to a virtual file ...
Luca Siegel's user avatar
1 vote
1 answer
139 views

Im trying to build a website where you have a canvas, 28x28 sized and you draw a number. This is all handled through classic HTML, css and Javascript. Hovewever, once the image is drawn, I want to ...
Luca Siegel's user avatar
1 vote
1 answer
80 views

I want to have a webpage run the Python program that connects to a Neo4j Database. The code must be run on the clientside device, and for parity reasons rewriting the code to be not Python is ...
user23417402's user avatar
1 vote
1 answer
78 views

I have a code (python) that converts any character on a keyboard to binary, but if the character has 2 zeros in the beginning of the binary code, it deletes 1 of the zeros, so it can't be converted ...
Kyle_3_1415's user avatar
-2 votes
1 answer
74 views

while using py-script in html i got this error:- ERROR image you can check here by opening the link i watched youtube videos but can't find any solution, i need to solve this error as soon as possible,...
Santosh Patil's user avatar
0 votes
0 answers
96 views

The title more or less tells it all. Ideally, I would like the html as self-sufficient as possible and definitely run the code in the browser. In addition, I would like be able to: use files, ...
Aleš Žiberna's user avatar
0 votes
1 answer
337 views

I'm working on this small project using JSON for the first time. This is also the first time I got back into programming in a while, so I'm a little rusty. Anyways, I've been trying to get Python to ...
billysgotsomequestions's user avatar
-1 votes
1 answer
47 views

enter image description here I added the needed google-generativeai but it still dosent work. Can someone help? Here is the parts of thePy script enter image description here Normaly the script should ...
Pinguin HD's user avatar
0 votes
0 answers
175 views

I want to run Python code from a text-area in HTML and save the output in a div. I am using pyodide.js https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.js to run Python. I would also like to use ...
inquilabee's user avatar
0 votes
0 answers
74 views

Generally, str objects display on the console. How can I convert my html object to an str object so that it can display on the console? x = HTML('<p>hello</p>') string = str(x) display(...
nasrin begum pathan's user avatar
-1 votes
1 answer
47 views

I am trying to store the html result inside a variable but it displays none. <!DOCTYPE html> <html lang="en"> <head> <title>Lively Forest</title> <!-- ...
nasrin begum pathan's user avatar
0 votes
0 answers
103 views

The following is pyscript.toml and main.py in my project directory; pyscript.toml name = "scikit-learn and matplotlib" packages = ["scikit-learn", "matplotlib"] main.py ...
Abednego Nasila's user avatar
0 votes
1 answer
208 views

When running the FlightRadarAPI on python 3.12, windows 11 I'm getting an ImportError: Can't connect to HTTPS URL because the SSL module is not available. Traceback (most recent call last): File &...
Eskimo868's user avatar
  • 240
-1 votes
1 answer
106 views

I'm doing a project, I need to print a weather forecast, it doesn't seem to give out an error code, but the page is empty. Nothing is output your text <!DOCTYPE html> <html> <head&...
Romario's user avatar
0 votes
1 answer
1k views

I want to host a python script on a website with pyscript, which has both console input and console output. how exactly do i do that? i used https://pyscript.com/ to make the website and github pages ...
CyberWolf's user avatar
0 votes
1 answer
187 views

I'm trying to get a button disabled when I press another button, but it's not working. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> ...
Joselu's user avatar
  • 13
1 vote
1 answer
353 views

I want to make a button change color with pyscript. This code doesn't work. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta ...
Joselu's user avatar
  • 13
0 votes
0 answers
57 views

I want to do a Panorama Image on a Html Side I already have a Python script running that makes a Panorama img realistic but now I am struggling to implement it on the html side. I hope somebody can ...
Elias.wyn's user avatar
0 votes
1 answer
805 views

I am running Python via Pyscript and my code used to work fine for around 1 year. However its no longer working and I get the following error message JsException(PythonError: Traceback (most recent ...
Jasim C's user avatar
0 votes
0 answers
124 views

There was a working pyscript code that used the "show" function from the "panel.io.pyodide" library. After updating panel 24.10.23 the code stopped working. I am new to python. ...
artsem krupenko's user avatar
0 votes
1 answer
93 views

move() if(character_data[0]['x']>=1): say("Yes") else: say("NO") I'm currently working with pyscript. When you put the code above into a code block (py-repl) and run it,...
김승주's user avatar

1
2 3 4 5 6