-
Notifications
You must be signed in to change notification settings - Fork 107
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
_pickle.UnpicklingError: the STRING opcode argument must be quoted #26
Comments
Hi @mohamedwahba129 were you able to fix this issue?
This error:
|
Hi, I met the same problem. I'm using Windows, and I think this problem may be caused by different encodings between OS. I processed the original original = "./models/flame_static_embedding.pkl"
destination = "./models/processed_embeeding.pkl"
content = ''
outsize = 0
with open(original, 'rb') as infile:
content = infile.read()
with open(destination, 'wb') as output:
for line in content.splitlines():
outsize += len(line) + 1
output.write(line + str.encode('\n'))
print("Done. Saved %s bytes." % (len(content)-outsize)) |
_pickle.UnpicklingError: the STRING opcode argument must be quoted How |
def load_binary_pickle( filepath ):
with open(filepath, 'rb') as f:
data = pickle.load(f, encoding="latin1")
return data
The text was updated successfully, but these errors were encountered: