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,正常,不再报错。

  • 相关阅读:
    Spring boot mybatis : Error creating bean with name 'com.github.pagehelper.autoconfigure.MapperAutoConfiguration': Invocation of init method failed;
    方法调用
    初识MQ
    Shell 变量
    Eclipse 导入本地 Git 项目
    IDEA 常用快捷键
    Xshell 配色方案
    冒泡排序
    递归
    安卓服务Service详解
  • 原文地址:https://www.cnblogs.com/bzdmz/p/14441046.html
Copyright © 2011-2022 走看看