While xxx.json is the index config file. However, got error
Traceback (most recent call last):
File "/Users/kel/Gitlab/env/bin/aliyunlog", line 13, in <module>
sys.exit(main())
File "/Users/kel/Gitlab/env/lib/python2.7/site-packages/aliyunlogcli/cli_core.py", line 247, in main
ret = getattr(client, method_name)(**args)
File "/Users/kel/Gitlab/env/lib/python2.7/site-packages/aliyun/log/logclient.py", line 1387, in create_index
body = six.b(json.dumps(index_detail.to_json()))
AttributeError: 'str' object has no attribute 'to_json'
After made some investigations, I found the root cause is the config file missed a required field "token", and a error log be printed to log file:
fail to load input via method from_json, try to call constructor for cls: <class 'aliyun.log.index_config.IndexConfig'>
ex:'token'
The error message is hard to understand. I think the original error message maybe better.
How reproduce: Create index with the following command:
While xxx.json is the index config file. However, got error
After made some investigations, I found the root cause is the config file missed a required field "token", and a error log be printed to log file:
The error message is hard to understand. I think the original error message maybe better.