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

  • 相关阅读:
    Spark Streaming自定义接收器
    between-flink-and-storm-Spark
    Java class loader 类加载器
    Spark 学习文章
    英文读音
    分布式系统论文
    git 常用命令
    CPU Cache
    elasticsearch 索引延迟 一致性问题等
    spark join
  • 原文地址:https://www.cnblogs.com/bzdmz/p/14441046.html
Copyright © 2020-2023  润新知