Title: I have a decode issue with GitPython · gitpython-developers/GitPython · Discussion #1374 · GitHub
Open Graph Title: I have a decode issue with GitPython · gitpython-developers/GitPython · Discussion #1374
X Title: I have a decode issue with GitPython · gitpython-developers/GitPython · Discussion #1374
Description: I have a decode issue with GitPython
Open Graph Description: My code is , And there is no chinese in my repo path。 And an exception was found. Exception in thread Thread-22: Traceback (most recent call last): File "C:\zhoujinyuWorkSpace\MyUe4\pyscript\venv\l...
X Description: My code is , And there is no chinese in my repo path。 And an exception was found. Exception in thread Thread-22: Traceback (most recent call last): File "C:\zhoujinyuWorkSpace\MyUe4\pyscript\v...
Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1374
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"I have a decode issue with GitPython","text":"My code is ,
\n\nAnd there is no chinese in my repo path。
\nAnd an exception was found.
\nException in thread Thread-22:\nTraceback (most recent call last):\n File \"C:\\zhoujinyuWorkSpace\\MyUe4\\pyscript\\venv\\lib\\site-packages\\git\\cmd.py\", line 106, in pump_stream\n for line in stream:\nUnicodeDecodeError: 'gbk' codec can't decode byte 0xa8 in position 1297: illegal multibyte sequence\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"c:\\python38\\lib\\threading.py\", line 932, in _bootstrap_inner\n self.run()\n File \"c:\\python38\\lib\\threading.py\", line 870, in run\n self._target(*self._args, **self._kwargs)\n File \"C:\\zhoujinyuWorkSpace\\MyUe4\\pyscript\\venv\\lib\\site-packages\\git\\cmd.py\", line 119, in pump_stream\n raise CommandError([f'<{name}-pump>'] + remove_password_if_present(cmdline), ex) from ex\ngit.exc.CommandError: Cmd('<stderr-pump>') failed due to: UnicodeDecodeError(''gbk' codec can't decode byte 0xa8 in position 1297: illegal multibyte sequence')\n cmdline: <stderr-pump> git pull -v origin\nUpdate C:/workspace/AClient_Bin/AClient/Content/ repo\n
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"Strangely enough it looks like I have seen this before.
\nThe problem seems to be that the python interpreter default code is gbk, but should be utf-8 for most purposes. It can be changed on startup I think.
\nIt looks like this is how you change the default encoding.
","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1374#discussioncomment-1593103"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:f0ed10dd-7166-3f7a-bec1-df7f3d355598 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | A80A:31CE75:1151E63:1700944:6969A8CC |
| html-safe-nonce | 8a278feeeebb7165b29968e33b137d4f66bf09c1fcd9a4cfe15a06fbdcd866ed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODBBOjMxQ0U3NToxMTUxRTYzOjE3MDA5NDQ6Njk2OUE4Q0MiLCJ2aXNpdG9yX2lkIjoiNjE5Nzg2ODY5NDQ1MzQ2MzI0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | efefb1b99d5cbd3fb5671bb72413f290c7dbb2284cd4650a4b9c7e9048caa6fa |
| hovercard-subject-tag | discussion:3668359 |
| github-keyboard-shortcuts | repository,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/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1374/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/ad9ce0f5435921d88d0f483c51f34ce51060500cf0640fd4ccbf06f627fcecc3/gitpython-developers/GitPython/discussions/1374 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad9ce0f5435921d88d0f483c51f34ce51060500cf0640fd4ccbf06f627fcecc3/gitpython-developers/GitPython/discussions/1374 |
| og:image:alt | My code is , And there is no chinese in my repo path。 And an exception was found. Exception in thread Thread-22: Traceback (most recent call last): File "C:\zhoujinyuWorkSpace\MyUe4\pyscript\venv\l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| 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 | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width