Closed Delilovic closed 3 years ago
Hi Looks like that you have to loop on a condition to check if the simulator is started, it's not done in the small extract you gave. See https://github.com/odwdinc/Python-SimConnect/blob/master/local_example.py#L69
OSError: [WinError -1073741648] Windows Error 0xc00000b0
Try OSError, lol 🙃
try:
print("Waiting for MSFS_2020 Simulator...")
sm = SimConnect()
print("Connected to MSFS_2020!")
except ConnectionError as err:
print("Error connecting to MSFS2020: {}".format(err))
except OSError as err:
print("OS error: {0}".format(err))
Hi Looks like that you have to loop on a condition to check if the simulator is started, it's not done in the small extract you gave. See https://github.com/odwdinc/Python-SimConnect/blob/master/local_example.py#L69
@storca
This might be the case if I would send or receive some requests from the simulator which I don't. It is true that I am inside a while loop but not doing anything. Here is a very simple way to reproduce this exception.
if __name__ == '__main__':
sm = SimConnect()
while True:
sleep(1)
3 Quit the sim 4 Read the exception from the console
@odwdinc it doesn't matter if you put try and except around it, the exception happens inside the thread of SimConnect() that is why you see Thread-1 exception
should be fix in 0.4.24 reopen if not.
Hello! Thank you for the great library!
I have an issue when closing the simulator while connected with SimConnect. The library throws an error in Thread 1 which I can not catch. Doing something like:
will not catch the error when connected to the simulator and suddenly closing the simulator. The following exception is thrown and can not be caught, any ideas? Thank you!