Hello, <coroutine object custom_input at 0xc4e9c8>! Nice to meet you!
Wow, <coroutine object custom_input at 0xc4f600> years old! That's awesome!
<coroutine object custom_input at 0xaf4cc0> is a great choice! I love that color too.
Thanks for chatting, <coroutine object custom_input at 0xc4e9c8>! Have a wonderful day!
What is your name?
Traceback (most recent call last):
File "<exec>", line 9, in custom_input_async
ImportError: cannot import name '__js_input__' from 'js' (unknown location)
Traceback (most recent call last):
File "/lib/python313.zip/_pyodide/_base.py", line 597, in eval_code_async
await CodeRunner(
...<9 lines>...
.run_async(globals, locals)
File "/lib/python313.zip/_pyodide/_base.py", line 411, in run_async
coroutine = eval(self.code, globals, locals)
File "<exec>", line 6, in <module>
File "<exec>", line 16, in custom_input
File "/lib/python313.zip/pyodide/webloop.py", line 369, in run_until_complete
return run_sync(future)
File "<exec>", line 9, in custom_input_async
ImportError: cannot import name '__js_input__' from 'js' (unknown location)
File "/lib/python313.zip/_pyodide/_base.py", line 523, in eval_code
.run(globals, locals)
~~~^^^^^^^^^^^^^^^^^
File "/lib/python313.zip/_pyodide/_base.py", line 357, in run
coroutine = eval(self.code, globals, locals)
File "<exec>", line 3, in <module>
ImportError: cannot import name '__js_input__' from 'js' (unknown location)
print("Welcome to the greeting program!")
print()
name = input("What is your name? ")
print(f"\nHello, {name}! Nice to meet you!")
age = input("How old are you? ")
print(f"\nWow, {age} years old! That's awesome!")
color = input("What's your favorite color? ")
print(f"\n{color} is a great choice! I love that color too.")
print(f"\nThanks for chatting, {name}! Have a wonderful day!")Python Terminal
Run
Traceback (most recent call last):
File "/lib/python313.zip/_pyodide/_base.py", line 523, in eval_code
.run(globals, locals)
~~~^^^^^^^^^^^^^^^^^
File "/lib/python313.zip/_pyodide/_base.py", line 357, in run
coroutine = eval(self.code, globals, locals)
File "<exec>", line 3, in <module>
ImportError: cannot import name '__js_input__' from 'js' (unknown location) - it should run, then pause and let me type stuff, then when i press enter, it carries on
Python Terminal
Run
Welcome to the greeting program!
What is your name?
What is your name?
Hello, <PyodideFuture pending cb=[WebLoop._decrement_in_progress()]>! Nice to meet you!
How old are you?
How old are you?
Wow, <PyodideFuture pending cb=[WebLoop._decrement_in_progress()]> years old! That's awesome!
What's your favorite color?
What's your favorite color?
<PyodideFuture pending cb=[WebLoop._decrement_in_progress()]> is a great choice! I love that color too.
Thanks for chatting, <PyodideFuture pending cb=[WebLoop._decrement_in_progress()]>! Have a wonderful day!
Pyodide version does not match: '0.29.1' <==> '0.26.4'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.