#803181 /usr/bin/dcut: UnicodeDecodeError when default_keyid contains non-ASCII character

#803181#5
Date:
2015-10-27 18:31:26 UTC
From:
To:
Hi,

The dcut shows the following error message when I configure
".dput.d/profiles/DEFAULT.json".


    Uploading commands file to ftp.upload.debian.org (incoming: /pub/UploadQueue/)
    Not uploading for real - dry run
    Traceback (most recent call last):
      File "/usr/bin/dcut", line 107, in <module>
        upload_command(args)
      File "/usr/lib/python2.7/dist-packages/dput/command.py", line 234, in invoke_dcut
        sign_file(fh.name, signing_key, profile, name, email)
      File "/usr/lib/python2.7/dist-packages/dput/command.py", line 130, in sign_file
        "name: %s, email: %s" % (filename, keyid, name, email))
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 16: ordinal not in range(128)

The content of ".dput.d/profiles/DEFAULT.json" is:

    {
        "default_keyid": "BE0C924203F4552D"
    }


The problem is that my keyring name is "ChangZhuo Chen (陳昌倬)", which
contains non-ASCII character. When the program try to log my name, it fails due
to non-ASCII in name. Remove the logger.debug in line 129 can workaround the
problem.