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'm not able to find any existing solution for this, but I had a python program that handles file uploads. When people upload file with name contains non-ascii characters, my program throws an exception:
File "/apps/nttech/controllers/GitController.py" in commit_all
99. repo.index.add([os.path.join(r or '', str(endfile))])
File "/spare/local/Projects/pythonbrew/venvs/Python-2.6.6/towerportal/lib/python2.6/site-packages/git/index/base.py" in add
780. self.write(ignore_extension_data=not write_extension_data)
File "/spare/local/Projects/pythonbrew/venvs/Python-2.6.6/towerportal/lib/python2.6/site-packages/git/index/base.py" in write
213. self._serialize(stream, ignore_extension_data)
File "/spare/local/Projects/pythonbrew/venvs/Python-2.6.6/towerportal/lib/python2.6/site-packages/git/index/base.py" in _serialize
176. entries = self._entries_sorted()
File "/spare/local/Projects/pythonbrew/venvs/Python-2.6.6/towerportal/lib/python2.6/site-packages/git/index/base.py" in _entries_sorted
173. return sorted(self.entries.values(), key=lambda e: (e.path, e.stage))
Exception Type: UnicodeDecodeError at /contractdb/contract/create/trading/
Exception Value: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
Is there a solution to this problem? Do I need to do any pre-processing for the file name? Thanks.
The text was updated successfully, but these errors were encountered:
Hmm, just read some other issues here, seems like it's fixed in the latest version? I'm using GitPythonh==1.0.1 but sounds like it's the latest version already. Also tried to download the latest code but still the same. Any thoughts?
I watched the video for issue #331, changed the file name in my program to be unicode, then the problem is solved. Not sure why GitPython is not able to handle it, hope to get an answer from the author.
Hi all:
I'm not able to find any existing solution for this, but I had a python program that handles file uploads. When people upload file with name contains non-ascii characters, my program throws an exception:
Is there a solution to this problem? Do I need to do any pre-processing for the file name? Thanks.
The text was updated successfully, but these errors were encountered: