Invalid base64-encoded string: number of data characters (158533) cannot be 1 more than a multiple of 4 #1274
Unanswered
enamulrafti
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While executing labelme2coco.py I am facing the issue. The issue is:
Traceback (most recent call last):
File "C:\Users\User\anaconda3\lib\site-packages\labelme\label_file.py", line 108, in load
imageData = base64.b64decode(data["imageData"])
File "C:\Users\User\anaconda3\lib\base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Invalid base64-encoded string: number of data characters (158533) cannot be 1 more than a multiple of 4
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\iar\prepocessing-codes\labelme2coco.py", line 222, in
main()
File "F:\iar\prepocessing-codes\labelme2coco.py", line 107, in main
label_file = labelme.LabelFile(filename=filename)
File "C:\Users\User\anaconda3\lib\site-packages\labelme\label_file.py", line 44, in init
self.load(filename)
File "C:\Users\User\anaconda3\lib\site-packages\labelme\label_file.py", line 138, in load
raise LabelFileError(e)
labelme.label_file.LabelFileError: Invalid base64-encoded string: number of data characters (158533) cannot be 1 more than a multiple of 4
and i have checked line no 108 in labelme.py which shows:
imageData = base64.b64decode(data["imageData"])
which i have tried to replace with this line:
imageData = base64.b64decode(data["imageData"] + '==')
which show this error:
Traceback (most recent call last):
File "C:\Users\User\anaconda3\lib\site-packages\labelme\label_file.py", line 109, in load
imageData = base64.b64decode(data["imageData"] + '==')
File "C:\Users\User\anaconda3\lib\base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Invalid base64-encoded string: number of data characters (678697) cannot be 1 more than a multiple of 4
Help me! thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions