--- a/src/eric7/MicroPython/Devices/TeensyDevices.py Mon Apr 24 17:51:11 2023 +0200 +++ b/src/eric7/MicroPython/Devices/TeensyDevices.py Thu Apr 27 17:59:09 2023 +0200 @@ -243,9 +243,10 @@ """ Private slot to reset the connected device. """ - self.microPython.deviceInterface().execute( - "import machine\nmachine.reset()\n", mode=self._submitMode - ) + if self.microPython.isConnected(): + self.executeCommands( + "import machine\nmachine.reset()\n", mode=self._submitMode + ) ################################################################## ## time related methods below