AttributeError:'list' 对象没有属性 'encode'

AttributeError:'list' 对象没有属性 'encode'

我收到以下错误。有什么建议吗?

Traceback (most recent call last):
  File "json2coco.py", line 11, in <module>
    lb2co.from_json(labeled_data=labeled_data, coco_output=os.path.abspath('test-results/labelbox2coco_1.json'))
  File "~/Labelbox/scripts/labelbox2coco/__init__.py", line 79, in from_json
    multipolygon = wkt.loads(data['Label'][cat])
  File "/usr/local/lib/python3.5/dist-packages/Shapely-1.6.4.post1-py3.5-linux-x86_64.egg/shapely/wkt.py", line 10, in loads
 return geos.WKTReader(geos.lgeos).read(data)
 File "/usr/local/lib/python3.5/dist-packages/Shapely-1.6.4.post1-py3.5-linux-x86_64.egg/shapely/geos.py", line 250, in read
 text = text.encode('ascii')
AttributeError: 'list' object has no attribute 'encode'

相关内容