Upload of a binary file from rhodecode web interface to a git repo failed

Issue #591 resolved
Former user created an issue

Tried uploading a MS Excel document thru the "add new file". It gave an error "Error occurred during commit". Same thing works fine with a text file.


2012-10-03 14:06:26.150 ERROR [rhodecode.controllers.files] Traceback (most recent call last): File "/home/rhodecode/Env/lib/python2.6/site-packages/rhodecode/controllers/files.py", line 345, in add content=content, f_path=node_path) File "/home/rhodecode/Env/lib/python2.6/site-packages/rhodecode/model/scm.py", line 483, in create_node parents=parents, branch=cs.branch) File "/home/rhodecode/Env/lib/python2.6/site-packages/rhodecode/lib/vcs/backends/git/inmemory.py", line 69, in commit blob = objects.Blob.from_string(node.content.encode(ENCODING)) UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 14: ordinal not in range(128)

Comments (2)

  1. Marcin Kuzminski repo owner

    Ahh that was a stupid error :/ git backend was always encoding content even for binary files, now fixed in beta branch, Thanks !

  2. Log in to comment