You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you provided a python script. ./tool/model2json, to convert model to json file. When i am running this script with my model i am getting error:
TypeError: write() argument must be str, not bytes
Getting this error make sense because, how can you write bytes to a file that is opened in string mode. At line model = base64.b64encode(bytes(open(sys.argv[3], 'rb').read()))
You are reading it in bytes but in line
with open(sys.argv1, 'w') as fo:
you are opening file in string mode and in line
fo.write(model)
You are writing bytes to string.
May be i am missing something, help me out with this.
The text was updated successfully, but these errors were encountered:
As you provided a python script. ./tool/model2json, to convert model to json file. When i am running this script with my model i am getting error:
TypeError: write() argument must be str, not bytes
Getting this error make sense because, how can you write bytes to a file that is opened in string mode. At line
model = base64.b64encode(bytes(open(sys.argv[3], 'rb').read()))
You are reading it in bytes but in line
with open(sys.argv1, 'w') as fo:
you are opening file in string mode and in line
fo.write(model)
You are writing bytes to string.
May be i am missing something, help me out with this.
The text was updated successfully, but these errors were encountered: