remote_ikernel
remote_ikernel copied to clipboard
problem with python3 str
Original report by Jean-Marc Andreoli (Bitbucket: jmandreoli, GitHub: jmandreoli).
The following lines (600-602) in kernel.py, which decode self.host, cause an error with slurm (and probably some other launchers), as the decoding happens too late.
#!python
# zmq needs str in Python 3, but pexpect gives bytes
if hasattr(self.host, 'decode'):
self.host = self.host.decode('utf-8')
And furthermore, there is no need to do the decoding again and again each time tunnel_cmd is invoked.
My fix: Move them just after launch_* but before start_kernel at line 240