bigchaindb / bigchaindb-driver

Official Python driver for BigchainDB
https://www.bigchaindb.com
Apache License 2.0
104 stars 104 forks source link

Problem: Error when building Handcrafting Transactions docs #476

Closed ttmc closed 6 years ago

ttmc commented 6 years ago

The docs would build, but the generated "Handcrafting Transactions" page was full of valid Python errors of the form: TypeError: Object of type 'bytes' is not JSON serializable

I guess sometimes people want to show the actual error messages in their docs, so such errors don't prevent Sphinx from thinking everything is okay.

Solution: Use base58.b58encode(key).decode() which is a str, instead of base58.b58encode(key) which is a bytes object. I defined a little helper function named b58() to reduce verbosity.

I don't know if this will get ReadTheDocs to start working (as per issue #475), but it does remove all the "Traceback" messages in the "Handcrafting Transactions" page of the docs.

ttmc commented 6 years ago

@codegeschrei I'm not sure why some tests in Travis are failing. They seem unrelated to the changes I made in this pull request.

codecov-io commented 6 years ago

Codecov Report

Merging #476 into master will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #476   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files           5        5           
  Lines         239      239           
=======================================
  Hits          236      236           
  Misses          3        3