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

ValueError when using rclone.hash() #42

Closed
alicethefemme opened this issue Oct 24, 2024 · 2 comments
Closed

ValueError when using rclone.hash() #42

alicethefemme opened this issue Oct 24, 2024 · 2 comments

Comments

@alicethefemme
Copy link
Contributor

alicethefemme commented Oct 24, 2024

Hello,
I am currently facing an issue where I am computing the hashes for every file in a bucket on my Wasabi remote directory. The hash command was working properly without errors on my local machine for testing, with the same remote linked up.
However, when it came to the production machine running my code, the error is there.

Error trace:

Traceback (most recent call last):
  File "/root/rclone-backup-filechecker-python/main.py", line 145, in <module>
    main()
  File "/root/rclone-backup-filechecker-python/main.py", line 43, in main
    dict_of_remote = get_hashes_from_files_remote(remote_path)
  File "/root/rclone-backup-filechecker-python/main.py", line 53, in get_hashes_from_files_remote
    result = rclone.hash(HashTypes.md5, remote_path)
  File "/usr/local/lib/python3.10/dist-packages/rclone_python/rclone.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/rclone_python/rclone.py", line 507, in hash
    value, key = l.split()
ValueError: too many values to unpack (expected 2)

My code: https://gitlab.atfdev.co.uk/alicethefemme/rclone-backup-filechecker-python

Does anyone know why this might be happening? Thanks!

@alicethefemme
Copy link
Contributor Author

Upon further inspection of the error, the line 522 in rclone.py is the issue. Not sure what is causing this error, but will have to check.

@alicethefemme
Copy link
Contributor Author

I managed to fix this using #43 to fix the error. The pull request passed without any other errors in CI/CD

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