xolox/python-humanfriendly

issue with raise InvalidSize(format(msg, size, tokens))

Opened this issue · 0 comments

Hi Recently been getting an issue getting this error, i thought it was the version so i updated also

Name: humanfriendly
Version: 10.0
Summary: Human friendly output for text interfaces using Python
Home-page: https://humanfriendly.readthedocs.io
Author: Peter Odding
Author-email: peter@peterodding.com
License: MIT
Location: /usr/local/lib/python3.5/dist-packages
Requires:

 File "/usr/local/lib/python3.5/dist-packages/humanfriendly/__init__.py", line 258, in parse_size
    raise InvalidSize(format(msg, size, tokens))

this is part of the script

 # Extract Added Bytes
        RLOG_ADDED=$(cat $RLOG | grep 'Added to the repo' | awk '{print $5,$6}' | \
                python3 -c 'import sys; import humanfriendly; print (humanfriendly.parse_size(sys.stdin.read(), binary=True))' )
        arr+=("- rescript.backup.added[$REPO] $TIME $RLOG_ADDED")
        echo "Bytes Added:      $RLOG_ADDED"

and part of the added to the repo was

Added to the repo: 117.726 GiB

could it be its not recognizing the size?

changed the 117.726 Gib to

11.26 GiB and it worked so something odd with the reading ?

Thank you