-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python code wont run and detects and invalid decimal literal on "60403" which is part of the code automatically upon starting a new project #126636
Comments
Could you please provide code example, which allows other to replicate your problem? |
Executing |
Confirming that the real code starts with bad code. You should only use: import serial
import time
import xpc
arduino_port = 'COM3' # Change this to the correct port for your system
baud_rate = 9600
ser = serial.Serial(arduino_port, baud_rate)
host = "127.0.0.1" # Localhost (X-Plane running on the same machine)
port = 49009 # Default X-Plane Connect port
xp = xpc.XPlaneConnect(host=host, port=port)
try:
while True:
if ser.in_waiting > 0:
button_state = int(ser.readline().strip())
print("Button state: ", button_state)
xp.sendDREF("sim/flightmodel/controls/gear_handle", button_state) # Example: control gear
time.sleep(0.1)
except KeyboardInterrupt:
print("Exiting program.")
finally:
ser.close()
xp.close() and not the
nor the |
Bug report
Bug description:
detects "60403" as invalid decimal literal, Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32 is already in the code when i start a new project
Full Code:
CPython versions tested on:
3.13
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: