• 解决weditor启动后,报错ValueError: not enough values to unpack (expected 2, got 1)


    在控制台输入python -m weditor后,报错:

    [E 210224 12:04:57 web:1789] Uncaught exception GET /api/v2/devices/-/hierarchy (::1)
    HTTPServerRequest(protocol='http', host='localhost:17310', method='GET', uri='/api/v2/devices/-/hierarchy', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
    File "D:Python39libsite-packages ornadoweb.py", line 1702, in _execute
    result = method(*self.path_args, **self.path_kwargs)
    File "D:Python39libsite-packagesweditorwebhandlerspage.py", line 93, in get
    d = get_device(device_id)
    File "D:Python39libsite-packagesweditorwebdevice.py", line 105, in get_device
    platform, uri = id.split(":", maxsplit=1)
    ValueError: not enough values to unpack (expected 2, got 1)
    [E 210224 12:04:57 web:2239] 500 GET /api/v2/devices/-/hierarchy (::1) 2.70ms

    解决方法:

    打开报错文件的105行,将1改成2即可

     "D:Python39libsite-packagesweditorwebdevice.py", line 105,

      platform, uri = id.split(":", maxsplit=1)改为2

    关闭控制台,并重新启动python -m weditor,正常,不再报错。

  • 相关阅读:
    glusterfs 术语
    python 随便
    ubuntu glusterfs 配置调试
    源码生成deb包
    常用apt cli
    unexpected error ConnectionError object has no attribute
    [MFC]透明图展示
    菜鸟的mongoDB学习---(六)MongoDB 索引
    Keyboard的显示与隐藏
    HDU 4268 Alice and Bob(贪心+Multiset的应用)
  • 原文地址:https://www.cnblogs.com/bzdmz/p/14441046.html
Copyright © 2020-2023  润新知