dusty-phillips / gitifyhg

Tools for using git as a client to mercurial repositories
GNU General Public License v3.0
62 stars 17 forks source link

TypeError: must be unicode, not str #97

Closed ssbarnea closed 9 years ago

ssbarnea commented 9 years ago
bash-3.2$ git clone gitifyhg::ssh://hg@bitbucket.org/phoebian/inquisitor
Cloning into 'inquisitor'...
Checking connectivity... done.
Traceback (most recent call last):
  File "/usr/local/bin/git-remote-gitifyhg", line 9, in <module>
    load_entry_point('gitifyhg==0.8.4', 'console_scripts', 'git-remote-gitifyhg')()
  File "/Library/Python/2.7/site-packages/gitifyhg/gitifyhg.py", line 344, in main
    HGRemote(*[x.decode('utf-8') for x in args]).process()
  File "/Library/Python/2.7/site-packages/gitifyhg/gitifyhg.py", line 207, in process
    self.marks.store()
  File "/Library/Python/2.7/site-packages/gitifyhg/util.py", line 209, in store
    file)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
TypeError: must be unicode, not str
asottile commented 9 years ago

+1

nordaux commented 9 years ago

Or open file for output in binary mode like 'wb' https://github.com/buchuki/gitifyhg/blob/master/gitifyhg/util.py#L202

marcbelmont commented 9 years ago

+1