Cryptic "ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running" within pyplot when running the Evo processing step in Lambkin #98
Evo fails with "ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running" within pyplot when running Evo after running a benchmark case.
Cause
The host from which I was starting the ssh connection to the server running Lambkin had the ForwardX11 option set to on in the ssh configuration because I had been testing remote X forwarding a few days ago.
This sets the DISPLAY environment variable in the session, which is inherited by the screen session and the docker container Lambkin runs in.
Since lambkin had previously been running within a screen session created several days before ForwardX11 was set tot true in the remote host, this only became an issue when I had to restart the container as a result of #97 .
Solution
Once I returned the ForwardX11 option to false, and restarted the container from a ssh connection started with forwarding off, evo now runs again.
Unsetting the DISPLAY env var probably would have worked as well.
Bug description
Evo fails with "ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running" within pyplot when running Evo after running a benchmark case.
Cause
The host from which I was starting the ssh connection to the server running Lambkin had the ForwardX11 option set to on in the ssh configuration because I had been testing remote X forwarding a few days ago.
This sets the DISPLAY environment variable in the session, which is inherited by the
screen
session and the docker container Lambkin runs in.Evo reads this variable to select the backend for plotting. When the variable is not empty, it selects TKAgg, but fails to use it within the container.
Since lambkin had previously been running within a
screen
session created several days before ForwardX11 was set tot true in the remote host, this only became an issue when I had to restart the container as a result of #97 .Solution
Once I returned the ForwardX11 option to false, and restarted the container from a ssh connection started with forwarding off, evo now runs again.
Unsetting the DISPLAY env var probably would have worked as well.