Tennis123765 2022-09-28 19:18 采纳率: 42.9%
浏览 69
已结题

Python子线程调用周立功can通讯包报错,报错如下。求解答

Exception ignored in: <module 'threading' from 'C:\Users\tangjiacheng\AppData\Local\Programs\Python\Python36\lib\threading.py'>
Traceback (most recent call last):
File "C:\Users\tangjiacheng\AppData\Local\Programs\Python\Python36\lib\threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:


def _shutdown():
    # Obscure:  other threads may be waiting to join _main_thread.  That's
    # dubious, but some code does it.  We can't wait for C code to release
    # the main thread's tstate_lock - that won't happen until the interpreter
    # is nearly dead.  So we release it here.  Note that just calling _stop()
    # isn't enough:  other threads may already be waiting on _tstate_lock.
    tlock = _main_thread._tstate_lock
    # The main thread isn't finished yet, so its thread state lock can't have
    # been released.
    assert tlock is not None  #######此处为1288行
    assert tlock.locked()
    tlock.release()
    _main_thread._stop()
    t = _pickSomeNonDaemonThread()
    while t:
        t.join()
        t = _pickSomeNonDaemonThread()
  • 写回答

2条回答 默认 最新

  • cyjbj 2022-09-29 08:57
    关注

    你把threading.py, line 1288,行附近代码贴出来才好分析问题啊,周立功的包是通过dll提供的吗?如果是的话请参考我博客:https://blog.csdn.net/cyjbj/article/details/126996793?spm=1001.2014.3001.5502

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 9月30日
  • 修改了问题 9月29日
  • 创建了问题 9月28日

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?