使用TI Chronos在Python中打开端口时出错 [英] Error while opening port in Python using TI Chronos

查看:288
本文介绍了使用TI Chronos在Python中打开端口时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从TI Chronos获取加速度计数据.运行代码时收到以下错误消息:

Traceback (most recent call last):
  File "C:\Python32\chronos_accel.py", line 50, in <module>

.

 .

   .

raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port COM4: [Error 5] Access is denied.

为什么拒绝访问?我是系统管理员.代码可能有问题吗?

解决方案

我知道了.很简单.

我只是在设备管理器窗口中禁用了COM端口,然后再次启用了它. /p>

I'm trying to get accelerometer data from TI Chronos. I get the following error message when I run the code:

Traceback (most recent call last):
  File "C:\Python32\chronos_accel.py", line 50, in <module>

.

 .

   .

raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port COM4: [Error 5] Access is denied.

Why is access denied? I'm the system administrator. Could it be a problem with the code?

解决方案

I figured it out. It was simple enough.

I just disabled the COM port in the Device Manager window and enabled it again.

这篇关于使用TI Chronos在Python中打开端口时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆