首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pythonmicro:位Bitio错误- microbit.repl.repl.REPLException:超时尝试接收

Pythonmicro:位Bitio错误- microbit.repl.repl.REPLException:超时尝试接收
EN

Stack Overflow用户
提问于 2022-11-06 11:36:30
回答 1查看 35关注 0票数 1

我有一个微:位(V1.3B),并且正在尝试在一个bitio图书馆 (macOS蒙特雷)上使用Python。我一直在跟踪入门部分,已经进入了“建立连接”部分

我已经通过上传文件将bitio.hex文件“闪烁”到微:位,它成功地显示了bitio徽标,就像显示的这里一样。

当我运行python3 counter.py时,它会给出以下错误:

代码语言:javascript
复制
microbit.repl.repl.REPLException: Timeout trying to receive [
raw EPL; CTRL-B to exit
>]

完整的回溯:

代码语言:javascript
复制
Traceback (most recent call last):
  File "/Users/User/Downloads/bitio-master/src/counter.py", line 3, in <module>
    import microbit
  File "/Users/User/Downloads/bitio-master/src/microbit/__init__.py", line 130, in <module>
    repl.to_raw()
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 109, in to_raw
    self.wait_repl_response()
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 143, in wait_repl_response
    self.receive("\r\nraw REPL; CTRL-B to exit\r\n>", timeout=2)
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 82, in receive
    raise REPLException("Timeout trying to receive [%s]" % buffer)
microbit.repl.repl.REPLException: Timeout trying to receive [
raw EPL; CTRL-B to exit
>]

全部产出:

代码语言:javascript
复制
User@Users-Macbook-Pro src % python3 counter.py
No micro:bit has previously been detected
Scanning for serial ports
remove device, then press ENTER
scanning...
found 137 device(s)
plug in device, then press ENTER
scanning...
found 138 device(s)
found 1 new device
selected:/dev/tty.usbmodem14202
Do you want this device to be remembered? (Y/N)Y
connecting...
Traceback (most recent call last):
  File "/Users/User/Downloads/bitio-master/src/counter.py", line 3, in <module>
    import microbit
  File "/Users/User/Downloads/bitio-master/src/microbit/__init__.py", line 130, in <module>
    repl.to_raw()
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 109, in to_raw
    self.wait_repl_response()
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 143, in wait_repl_response
    self.receive("\r\nraw REPL; CTRL-B to exit\r\n>", timeout=2)
  File "/Users/User/Downloads/bitio-master/src/microbit/repl/repl.py", line 82, in receive
    raise REPLException("Timeout trying to receive [%s]" % buffer)
microbit.repl.repl.REPLException: Timeout trying to receive [
raw EPL; CTRL-B to exit
>]
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-06 14:44:56

修复了这个问题,结果我不得不在设置中给予终端(或任何编辑器/IDE)完整的磁盘访问权限。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74335503

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档