Title: Cannot add utf8 path to repository · Issue #331 · gitpython-developers/GitPython · GitHub
Open Graph Title: Cannot add utf8 path to repository · Issue #331 · gitpython-developers/GitPython
X Title: Cannot add utf8 path to repository · Issue #331 · gitpython-developers/GitPython
Description: Running the code below on a Linux machine with PythonGit 1.0.1 fails, but works with PythonGit 0.3.2 RC1 Python version: 2.7.10 Output when using PythonGit 1.0.1: 1.0.1 Traceback (most recent call last): File "corpustools/test/test_git.p...
Open Graph Description: Running the code below on a Linux machine with PythonGit 1.0.1 fails, but works with PythonGit 0.3.2 RC1 Python version: 2.7.10 Output when using PythonGit 1.0.1: 1.0.1 Traceback (most recent call ...
X Description: Running the code below on a Linux machine with PythonGit 1.0.1 fails, but works with PythonGit 0.3.2 RC1 Python version: 2.7.10 Output when using PythonGit 1.0.1: 1.0.1 Traceback (most recent call ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot add utf8 path to repository ","articleBody":"Running the code below on a Linux machine with PythonGit 1.0.1 fails, but works with PythonGit 0.3.2 RC1\n\n**Python version: 2.7.10**\n\n**Output when using PythonGit 1.0.1:**\n1.0.1\nTraceback (most recent call last):\n File \"corpustools/test/test_git.py\", line 11, in \u003cmodule\u003e\n r.index.add(['ø.txt'])\n File \"/usr/local/lib/python2.7/dist-packages/git/index/base.py\", line 780, in add\n self.write(ignore_extension_data=not write_extension_data)\n File \"/usr/local/lib/python2.7/dist-packages/git/index/base.py\", line 213, in write\n self._serialize(stream, ignore_extension_data)\n File \"/usr/local/lib/python2.7/dist-packages/git/index/base.py\", line 180, in _serialize\n write_cache(entries, stream, extension_data)\n File \"/usr/local/lib/python2.7/dist-packages/git/index/fun.py\", line 132, in write_cache\n write(path.encode(defenc))\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)\n\n**Output when using PythonGit 0.3.2 RC1**\n0.3.2 RC1\n\nThis is the version that is installed by the distribution (Kubuntu 15.10)\n\n``` python\n# -*- coding:utf-8 -*-\nimport git\nimport testfixtures\n\nprint git.__version__\n\ntempdir = testfixtures.TempDirectory(ignore=['.git'])\ntempdir.makedir('orig/smj/ficti/sub')\ntempdir.write('orig/smj/ficti/sub/ø.txt', 'content of ø')\n\nr = git.Repo.init(tempdir.path)\nr.index.add(['orig'])\nr.index.commit('Added orig and prestable')\n\ntempdir.cleanup()\n```\n","author":{"url":"https://github.com/albbas","@type":"Person","name":"albbas"},"datePublished":"2015-07-29T16:11:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/331/GitPython/issues/331"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:90c29c1c-94de-5231-a91c-cb1172873dc4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDAE:12E8CD:82BE3:AE447:6969CCF5 |
| html-safe-nonce | aae109dedf2af15475b700c456b78ec9f180c4d433c8288dbe2643cec43af83c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREFFOjEyRThDRDo4MkJFMzpBRTQ0Nzo2OTY5Q0NGNSIsInZpc2l0b3JfaWQiOiIzNzQwNjg2MzQwNjk3MjE0MTk3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2c4b8447596a62bcc10adc574d7b83a7e32a3af9424fb4516b31a43dcd969e1c |
| hovercard-subject-tag | issue:97972192 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f5b34975f1d1b023142cf0a1d8d5e6a0b9ff7458c1f3539519a5391fa4d83dd/gitpython-developers/GitPython/issues/331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f5b34975f1d1b023142cf0a1d8d5e6a0b9ff7458c1f3539519a5391fa4d83dd/gitpython-developers/GitPython/issues/331 |
| og:image:alt | Running the code below on a Linux machine with PythonGit 1.0.1 fails, but works with PythonGit 0.3.2 RC1 Python version: 2.7.10 Output when using PythonGit 1.0.1: 1.0.1 Traceback (most recent call ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | albbas |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width