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

[WIP] Fixed running the kernel in Python3.x #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions geonotebook/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def make_param(p, default=False):
predicate=lambda x: ismethod(x) or isfunction(x)
) if fn in cls.msg_types}

return cls._protocol.values()
return list(cls._protocol.values())

def _send_msg(self, msg):
"""Send a message to the client.
Expand All @@ -256,7 +256,7 @@ def _reconcile_parameters(self, method, params):
for p in self._protocol[method]['required']]
except KeyError:
raise jsonrpc.InvalidParams(
u"missing required params for method: %s" % method
"missing required params for method: %s" % method
)

kwargs = {p['key']: param_hash[p['key']]['value']
Expand All @@ -281,7 +281,7 @@ def _recv_msg(self, msg):
# Otherwise process the request from the remote RPC client.
elif is_request(msg):
method, params = msg['method'], msg['params']
if method in self._protocol.keys():
if method in list(self._protocol.keys()):
try:
args, kwargs = self._reconcile_parameters(method, params)

Expand Down Expand Up @@ -489,10 +489,10 @@ def handle_comm_msg(self, message):
self.geonotebook._send_msg(
json_rpc_result(None, e.tojson(), msg['id'])
)
self.log.error(u"JSONRPCError (%s): %s" % (e.code, e.message))
self.log.error("JSONRPCError (%s): %s" % (e.code, e.message))

except Exception as e:
self.log.error(u"Error processing msg: {}".format(str(e)))
self.log.error("Error processing msg: {}".format(str(e)))

def handle_comm_open(self, comm, msg):
"""Handle opening a comm.
Expand Down