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

'float' object cannot be interpreted as an integer #46

Open
unbranched opened this issue Aug 23, 2023 · 1 comment
Open

'float' object cannot be interpreted as an integer #46

unbranched opened this issue Aug 23, 2023 · 1 comment

Comments

@unbranched
Copy link

The application suddenly doesn't work, it's many months I don't use it so I don't remember if I'm doing something wrong:

~$ jsonpyes --data input.json --bulk http://xxx.com:9201 --import --index my_index --thread 4 --check

All raw JSON data valid!
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/bin/jsonpyes", line 150, in worker_import_to_es_for_threading
    for i in range(start_line, stop_line + 1):
TypeError: 'float' object cannot be interpreted as an integer
Successfully data imported!

The message is immediate, it says successfully imported but it's not true.

My setup:
python 3.8.10
Remote ES 7.13.0

@xros
Copy link
Owner

xros commented Mar 13, 2024

Did you forget the flag --type for importing?

In this case, try jsonpyes --data input.json --bulk http://xxx.com:9201 --import --index my_index --type my_type_1 --thread 4 --check

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

2 participants