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

Large integers are strings in the response dictionary #247

Open
mgritter opened this issue Jun 10, 2018 · 0 comments
Open

Large integers are strings in the response dictionary #247

mgritter opened this issue Jun 10, 2018 · 0 comments

Comments

@mgritter
Copy link

Version of Python you are running

3.5.2

Version of steem-python you are running

1.0.1 (from pypi)

Expected Behavior

Values in response dictionaries that are integers should be of integer type.

 {'percent': 10000,
  'reputation': 3112321478,
  'rshares': 58495538528,          ### int
  'time': '2018-06-10T02:35:09',
  'voter': 'particleman',
  'weight': 808},

Actual Behavior

Numbers which are too large (for standard JSON, I guess?) are returned as strings instead:

 {'percent': 10000,
  'reputation': 3112321478,
  'rshares': '58495538528',     ### string
  'time': '2018-06-10T02:35:09',
  'voter': 'particleman',
  'weight': 808},

Steps to reproduce

My example came from the response to

votes = s.get_active_votes( 'markgritter', 'standing-pat-when-you-re-not-the-favorite-in-triple-draw' )

For now I'm working around this by just wrapping int(x) around every response that might not be an int already.

Stack Trace

n/a

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