Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jcfr opened this issue Nov 8, 2017 · 0 comments

Comments

@jcfr
Copy link
Collaborator

jcfr commented Nov 8, 2017

$ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant