Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Crash with unicode path #761

Copy link
Copy link

Description

@vtsisyk
Issue body actions

Hi, I ran into a problem that this library doesn't support unicode in path

I use:

  1. Debian 9
  2. Python 3.5.3
  3. GitPython==2.1.10 (installed by pip3 install GitPython command)

i found old issue, similar to mine, but it doesn't helped me:
#532

Everything works just fine if i will use path without cyrillic letters.
Code what doesn't work:

#!/usr/bin/python3
import git
def main():

    repo = git.Repo.clone_from("https://github.com/gitpython-developers/GitPython.git",
        "/home/vlad/AltSTU-Submodules/Диплом/Microcontroller-Unit-Testing/scripts/")

if __name__ == '__main__':
    main()
Traceback (most recent call last):
  File "gitl.py", line 13, in <module>
    main()
  File "gitl.py", line 9, in main
    "/home/vlad/AltSTU-Submodules/Диплом/Microcontroller-Unit-Testing/scripts/")
  File "/home/vlad/.local/lib/python3.5/site-packages/git/repo/base.py", line 982, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs)
  File "/home/vlad/.local/lib/python3.5/site-packages/git/repo/base.py", line 933, in _clone
    finalize_process(proc, stderr=stderr)
  File "/home/vlad/.local/lib/python3.5/site-packages/git/util.py", line 333, in finalize_process
    proc.wait(**kwargs)
  File "/home/vlad/.local/lib/python3.5/site-packages/git/cmd.py", line 402, in wait
    stderr = force_bytes(stderr)
  File "/home/vlad/.local/lib/python3.5/site-packages/gitdb/utils/encoding.py", line 16, in force_bytes
    return data.encode(encoding)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 54-59: ordinal not in range(128)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.