You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: argument 's': 'int' object cannot be converted to 'PyString'
Works fine if you explicitly convert integer/non-string values to a string using str():
pyxel.text(50, 50, str(pyxel.frame_count), 1)
Would it be possible for text() to behave similarly to print() and convert all arguments to strings where necessary.
The text was updated successfully, but these errors were encountered:
notbored
changed the title
text() throws TypeError when giving a non-string value to it's string parametertext() throws TypeError when giving a non-string value to it's s parameter
Feb 1, 2022
It's a good idea, but due to the Rust module for making Python interface, it's difficult to implement without dirty hack on Python side. When I found the way of automatic casting on pyo3 (it's the name of the rust module), I'll implement this feature.
Causes:
Works fine if you explicitly convert integer/non-string values to a string using
str()
:Would it be possible for
text()
to behave similarly toprint()
and convert all arguments to strings where necessary.The text was updated successfully, but these errors were encountered: