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

Incorrect exception when passing a variable of type set #57

Open
eyurtsev opened this issue Jun 30, 2016 · 1 comment
Open

Incorrect exception when passing a variable of type set #57

eyurtsev opened this issue Jun 30, 2016 · 1 comment

Comments

@eyurtsev
Copy link

import jsonrpclib

server = jsonrpclib.Server('http://localhost:5003/api')
server.any_function(any_variable=set()) #  <-- Should fail, but with a better exception

Produces the following exception which makes it difficult to troubleshoot the cause:

---> 63     module_name = inspect.getmodule(obj).__name__
     64     class_name = obj.__class__.__name__
     65     json_class = class_name

AttributeError: 'NoneType' object has no attribute '__name__'
@anxuae
Copy link

anxuae commented Jan 3, 2019

Hi,

I have the same issue this the bytearray type. I guess that is because we are using builtin types.
And thus there is no real module where the class is defined.

The builtin types should be managed case by case in the jsonclass.py module.

@joshmarshall are you still maintening this lib? Seem that last update on pypi is quite old. Maybe there is aother alternative to this lib?

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

2 participants