Using Serial on Python / Win7

无人久伴 提交于 2019-11-29 18:02:06
NPE

You don't need to call open. The constructor already does that, and on Windows whoever opens a COM port has exclusive access to it until they close it.

As to the second problem, take a look at How can I fix "[Error 6] The handle is invalid." with PySerial

oyildirim

Here is what I do to eliminate Access Denied Error:

  1. Press Ctrl + Alt + Del

  2. Select pythonw.exe and press End Process

  3. Re-Run your application in IDLE

It should be run without any access denied error.

You need to be running python.exe in elevated mode. Right click and click Run as administrator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!