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
Hi, in integration of GitPython I ran into an issue with cloning into directories that have an unicode name. This was an issue with version 2.1.9 and has not been fixed with upgrade to 3.0.2.
I am using Python 3.7.
Basically, if you pass a str with some unicode to e.g. Repo.clone_from than the package throws an UnicodeEncodeError, it seems in processing of the output of the command.
Since GitPython is Python 3+ only now, it would make make sense to set the default encoding in force_bytes to utf-8, that actually fixes the issue when I try it. This was proposed in gitpython-developers/gitdb#48 and or gitpython-developers/gitdb#49, but it's been a while since those have been proposed.
Maybe an another solution would be for the use to be able to select the default encoding somehow, as not to break previous cases, but to provide a solution for this issue?
This is related to #761, which seems to be stale at the moment. I'm raising the issue again since it's still an problem in the new version of GitPython which is Python 3+.
The text was updated successfully, but these errors were encountered:
Thanks for raising the issue, it's known that (unfortunately) the encoding of strings is very messy in GitPython. No proper solution was ever implemented, yet I hope thanks to thoughtful contributions, we can eventually get there.
ulturt
added a commit
to ulturt/GitPython
that referenced
this issue
Oct 26, 2019
Hi, in integration of GitPython I ran into an issue with cloning into directories that have an unicode name. This was an issue with version 2.1.9 and has not been fixed with upgrade to 3.0.2.
I am using Python 3.7.
Basically, if you pass a
str
with some unicode to e.g.Repo.clone_from
than the package throws anUnicodeEncodeError
, it seems in processing of the output of the command.Since GitPython is Python 3+ only now, it would make make sense to set the default encoding in
force_bytes
to utf-8, that actually fixes the issue when I try it. This was proposed in gitpython-developers/gitdb#48 and or gitpython-developers/gitdb#49, but it's been a while since those have been proposed.Maybe an another solution would be for the use to be able to select the default encoding somehow, as not to break previous cases, but to provide a solution for this issue?
This is related to #761, which seems to be stale at the moment. I'm raising the issue again since it's still an problem in the new version of GitPython which is Python 3+.
The text was updated successfully, but these errors were encountered: