samkuehn/bitbucket-backup

UnicodeEncodeError

Closed this issue · 3 comments

When using -v switch:

Traceback (most recent call last):
  File "bitbucket-backup/backup.py", line 151, in <module>
    repos = user.repositories()
  File "/mnt/storage0/_auto/voipex/_bin/bitbucket-backup/bitbucket-backup/bitbucket/api.py", line 132, in repositories
    user_data = self.get()
  File "/mnt/storage0/_auto/voipex/_bin/bitbucket-backup/bitbucket-backup/bitbucket/api.py", line 144, in get
    return json.loads(self.bb.load_url(url))
  File "/mnt/storage0/_auto/voipex/_bin/bitbucket-backup/bitbucket-backup/bitbucket/api.py", line 93, in load_url
    print(u"Response data: [{0}]".format(result))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 2110: ordinal not in range(128)
Unknown error. (11)

Can you try this branch and see if it works?
https://github.com/samkuehn/bitbucket-backup/tree/fix-unicode

Yes, it works now.

Fixed with c2d9f4f