Skip to content

Failed to update release-notes using python 3.5: is not JSON serializable error #37

@jcfr

Description

@jcfr
$ githubrelease release j0057/github-release release-notes ${release}
updating '1.5.7' release: 
  body: 'None' -> 'b'Features (CLI and Python API)\n-----------------------------\n\n* ``release`` command:\n\n  * ``edit``:\n\n    * Add ``--publish`` flag having opposite effect of ``--draft``\n    * Add ``--release`` flag having opposite effect of ``--prerelease``\n\nPython API\n----------\n\n* Add ``gh_commit_get`` allowing to commit properties or check if a commit exists.\n''

Traceback (most recent call last):
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/bin/githubrelease", line 11, in <module>
    sys.exit(main())
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/github_release.py", line 573, in _cli_release_notes
    gh_release_notes(*args, **kwargs)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/github_release.py", line 116, in with_check_for_credentials
    return func(*args, **kwargs)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/github_release.py", line 592, in gh_release_notes
    patch_release(repo_name, tag_name, body=body)
  File "/home/jcfr/.virtualenvs/test-githubrelease-install/lib/python3.5/site-packages/github_release.py", line 372, in patch_release
    data=json.dumps(data),
  File "/usr/lib/python3.5/json/__init__.py", line 230, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.5/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.5/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.5/json/encoder.py", line 180, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'Features (CLI and Python API)\n-----------------------------\n\n* ``release`` command:\n\n  * ``edit``:\n\n    * Add ``--publish`` flag having opposite effect of ``--draft``\n    * Add ``--release`` flag having opposite effect of ``--prerelease``\n\nPython API\n----------\n\n* Add ``gh_commit_get`` allowing to commit properties or check if a commit exists.\n' is not JSON serializable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions