Open vvip opened 5 years ago
Here's a quick fix for jsonpyes file:
for job in process_jobs:
if type(job) == dict:
if 'data' in job:
data = job['data']
if 'bulk' in job:
bulk = job['bulk']
if 'index' in job:
index = job['index']
if 'type' in job:
doc_type = job['type']
if 'thread' in job:
thread_amount = int(job['thread_amount'])
@vvip @tdracz
Fixed. Merged into master. https://github.com/xros/jsonpyes/pull/42
Thanks for the notice! Try jsonpyes 1.4.2+
[root@SZX1000522574 data]# python -V Python 3.6.8 [root@SZX1000522574 data]# jsonpyes --data 2019-04-19.json --check Traceback (most recent call last): File "/usr/local/bin/jsonpyes", line 588, in
run()
File "/usr/local/bin/jsonpyes", line 411, in run
if job.has_key('data'):
AttributeError: 'dict' object has no attribute 'has_key'