在所有 figway python 脚本中出现错误

Getting an error in all figway python scripts

我克隆了 figway 的 github 项目,以便查询 orion 实体的属性,但我在所有 python 脚本中遇到错误:

File "GetEntity.py", line 37, in <module> 
    config = ConfigParser.RawConfigParser(allow_no_value=True)
TypeError: __init__() got an unexpected keyword argument 'allow_no_value'

我这样称呼它 -> python GetEntity.py 房间

调查正在发生的事情的一些提示:

  • 您应该使用 Python2.7 到 运行 这些脚本。你能告诉我你使用的是哪个版本和 OS 吗?
  • 我们上周更新了 FIGWAY。如果你以前做过,能再克隆一次吗?
  • 您应该在以下文件夹中使用新脚本:/python-IDAS4/ContextBroker

根据之前的假设,您应该得到这样的结果(只要该实体目前不存在于该 ContextBroker 上):

i6@raspberrypi ~/github/fiware-figway/python-IDAS4/ContextBroker $ python GetEntity.py Room
* Asking to http://130.206.80.40:1026/ngsi10/queryContext
* Headers: {'Fiware-Service': 'OpenIoT', 'content-type': 'application/json', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
* Sending PAYLOAD: 
{
    "entities": [
        {
            "type": "", 
            "id": "Room", 
            "isPattern": "false"
        }
    ], 
    "attributes": []
}

...

* Status Code: 200
* Response: 
{
  "errorCode" : {
    "code" : "404",
    "reasonPhrase" : "No context element found"
  }
}