Skip to content

Commit calling into TransactionBuilder Python 2.7 str/unicode incompatibility #190

Closed

Description

I can post content smoothly with python3.6, but when I change to post it with python2.7.14, I get a Error that is "Invalid TransactionBuilder Format".
I will simplify the problem into the following code:

from stee import Steem
s = Steem(...)
s.post(title='test', body='test', author='myname', tags=('steemtest',), permlink='ywqamoc1')

here is Error content:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.7/site-packages/steem/commit.py", line 353, in post
    return self.finalizeOp(ops, author, "posting")
  File "/usr/local/lib/python2.7/site-packages/steem/commit.py", line 132, in finalizeOp
    tx.sign()
  File "/usr/local/lib/python2.7/site-packages/steem/transactionbuilder.py", line 118, in sign
    raise ValueError("Invalid TransactionBuilder Format")
ValueError: Invalid TransactionBuilder Format

How to solve this problem ?

Activity

  1. self-assigned this
    on Mar 26, 2018
  2. cyon1c commented on Mar 27, 2018

    @cyon1c
    Contributor

    The error raised masks the actual issue, which is unicode vs str handling in 2.7.

    The actual error is descriptor 'title' requires a 'str' object but received a 'unicode'.

    This appears to be a Python 2 bug only.

  3. changed the title [-]when I post a something with python2.7.14, I get "Invalid TransactionBuilder Format" Error[/-] [+]Commit.Post Python 2.7 str/unicode incompatibility[/+] on Mar 27, 2018
  4. changed the title [-]Commit.Post Python 2.7 str/unicode incompatibility[/-] [+]Commit calling into TransactionBuilder Python 2.7 str/unicode incompatibility[/+] on Apr 4, 2018
  5. cyon1c commented on Apr 5, 2018

    @cyon1c
    Contributor

    This should be resolved with #203 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions