Giter Site home page Giter Site logo

json-rpc-python's People

Contributors

randomorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

json-rpc-python's Issues

Python 3 Compatibility, Updated Tests

Greetings, I've been using this package in my own applications, but I need it to be Python 3.6 compatible. I updated a fork of this repo for this purpose and did some PEP 8 cleanup. I updated the tests and they were all passing on my system before this pull request... I was hoping you might merge these changes if you like what you see. Thanks!

rdoclient is not able to pase response to JSON inside the library.

I am using this line:

from rdoclient import RandomOrgClient
random_org = RandomOrgClient(MY_TOKEN) 
response = random_org.generate_signed_integers(5, 0, 10, replacement=False, user_data={"data":"foo"})

NOTE: I was working a couple of days ago without any issue. Then, I got this.

NOW, I'm getting this error.

Exception in thread Thread-2 (_threaded_request_sending):
Traceback (most recent call last):
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\site-packages\rdoclient\rdoclient.py", line 2717, in _threaded_request_sending
    data = self._send_request_core(request['request'])
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\site-packages\rdoclient\rdoclient.py", line 2768, in _send_request_core
    data=json.dumps(request),
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Users\Walte\AppData\Local\Programs\Python\Python310\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type RandomOrgClient is not JSON serializable

PYTHON VERSION: 3.10.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.