Skip to content

Incorrect exception when passing a variable of type set #57

Open
@eyurtsev

Description

@eyurtsev
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__'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions