remote_ikernel icon indicating copy to clipboard operation
remote_ikernel copied to clipboard

problem with python3 str

Open tdaff opened this issue 5 years ago • 3 comments

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

tdaff avatar Aug 24 '18 18:08 tdaff