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

redis.exceptions.DataError: A tuple item must be str, int, float or bytes. #243

Open
sudeepbogati7 opened this issue Oct 29, 2024 · 2 comments

Comments

@sudeepbogati7
Copy link

While running :

/ail-framework/bin/crawlers/Crawler.py

Does this error related to lacus ?

Traceback (most recent call last):
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/connection.py", line 78, in pack
    output.append(hiredis.pack_command(args))
TypeError: A tuple item must be str, int, float or bytes.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./Crawler.py", line 282, in <module>
    module = Crawler()
  File "./Crawler.py", line 46, in __init__
    crawlers.reload_crawler_captures()
  File "/root/ail-framework/bin/lib/crawlers.py", line 1015, in reload_crawler_captures
    capture.update(None)
  File "/root/ail-framework/bin/lib/crawlers.py", line 1071, in update
    r_cache.hset(f'crawler:capture:{self.uuid}', 'status', CaptureStatus.UNKNOWN)
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/commands/core.py", line 5045, in hset
    return self.execute_command("HSET", name, *pieces)
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/client.py", line 559, in execute_command
    return self._execute_command(*args, **options)
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/client.py", line 567, in _execute_command
    return conn.retry.call_with_retry(
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/retry.py", line 62, in call_with_retry
    return do()
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/client.py", line 568, in <lambda>
    lambda: self._send_command_parse_response(
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/client.py", line 541, in _send_command_parse_response
    conn.send_command(*args, **options)
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/connection.py", line 557, in send_command
    self._command_packer.pack(*args),
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/connection.py", line 81, in pack
    raise DataError(value).with_traceback(traceback)
  File "/root/ail-framework/AILENV/lib/python3.8/site-packages/redis/connection.py", line 78, in pack
    output.append(hiredis.pack_command(args))
redis.exceptions.DataError: A tuple item must be str, int, float or bytes.
@sudeepbogati7
Copy link
Author

@Rafiot
Copy link
Contributor

Rafiot commented Nov 5, 2024

That's a weird issue, generally means that one of the value added to redis is None, but that doesn't makes much sense there on the call r_cache.hset(f'crawler:capture:{self.uuid}', 'status', CaptureStatus.UNKNOWN).

Having a quick look at the code makes me think that you're either using an old version of the project, or that the script was still running on that old version of the code when it crashed.

@Terrtia any idea?

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