Skip to content

how to send non-ascii code with the client? #3

Description

@luvwinnie

i have tried with the opennlp.py and client.py

I wish to use different languages model with Japanese language. But when i send the non-ascii character it show this error, does anyone know how to solve this?

Traceback (most recent call last): File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/site-packages/jsonrpclib/SimpleJSONRPCServer.py", line 460, in do_POST data, getattr(self, '_dispatch', None), self.path) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/site-packages/jsonrpclib/SimpleJSONRPCServer.py", line 280, in _marshaled_dispatch return jsonrpclib.jdumps(response, self.encoding) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/site-packages/jsonrpclib/jsonrpc.py", line 164, in jdumps return json.dumps(obj) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/Users/cheesiang_leow/.conda/envs/tensorflow-env/lib/python3.6/json/encoder.py", line 180, in default o.__class__.__name__) TypeError: Object of type 'bytes' is not JSON serializable

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