zoukankan      html  css  js  c++  java
  • 解决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,正常,不再报错。

  • 相关阅读:
    openpyxl(python操作Excel)
    python爬虫之数据加密解密
    python爬虫之字体反爬
    识别缩略图加载
    Windows文件共享自动失效解决办法
    pygame
    获取文件路径、文件名、后缀名
    Oracle EBS INV 挑库发放物料搬运单
    Oracle EBS INV 删除保留
    Oracle EBS INV 创建货位
  • 原文地址:https://www.cnblogs.com/bzdmz/p/14441046.html
Copyright © 2011-2022 走看看