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
I want to fetch a binary file via repo.git.show. That works until I want to handle it as binary file.
fromioimportBytesIOimportgit# initialize repositoryrepo=git.Repo('.')
# use git show to get the content of example.jpg in revision 19e91au=repo.git.show("4cb2a02:example.jpg")
b=BytesIO(u.encode('utf-8'))
I run into
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 0: surrogates not allowed
Can I fetch the file binary in any way?
This is more a feature request than a bug. I want to apologize if this is not the correct way to handle it.
The text was updated successfully, but these errors were encountered:
I want to fetch a binary file via
repo.git.show
. That works until I want to handle it as binary file.I run into
Can I fetch the file binary in any way?
This is more a feature request than a bug. I want to apologize if this is not the correct way to handle it.
The text was updated successfully, but these errors were encountered: