Skip to content

Encoding problems when body contains non ascii chars #40

Open
@lucasbrunialti

Description

@lucasbrunialti

First, j0057 that's a really nice project! :)

Using Python2.7 and running the following command raises an exception:

githubrelease release Cobliteam/ommited edit v1.0.1-dev.3 --body 'Merges since 2018-01-24 18:38:46 +0000: - message with non ascii char: … '

Exception traceback:

Traceback (most recent call last):
  File "/home/travis/build/Cobliteam/ommited/venv/bin/githubrelease", line 11, in <module>
    sys.exit(main())
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/github_release.py", line 482, in _cli_release_edit
    gh_release_edit(*args, **kwargs)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/github_release.py", line 116, in with_check_for_credentials
    return func(*args, **kwargs)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/github_release.py", line 497, in gh_release_edit
    patch_release(repo_name, current_tag_name, **attributes)
  File "/home/travis/build/Cobliteam/ommited/venv/local/lib/python2.7/site-packages/github_release.py", line 362, in patch_release
    current_tag_name, "\n  ".join(updated)))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 167: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions