Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 not support #41

Open
vvip opened this issue May 21, 2019 · 2 comments
Open

Python 3.6 not support #41

vvip opened this issue May 21, 2019 · 2 comments

Comments

@vvip
Copy link

vvip commented May 21, 2019

[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'

@tdracz
Copy link

tdracz commented Jul 2, 2019

Here's a quick fix for jsonpyes file:

Line 409 and next

    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'])

@xros
Copy link
Owner

xros commented Jul 4, 2019

@vvip @tdracz
Fixed. Merged into master. #42
Thanks for the notice! Try jsonpyes 1.4.2+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants