ete icon indicating copy to clipboard operation
ete copied to clipboard

kernel dies when trying to visualize a tree

Open polinanvkv opened this issue 4 years ago • 4 comments

Hello,

I am looking through the tutorial and trying to visualize a phylogenetic tree with the alignment. After running t.show(tree_style=ts) in Jupiter notebook I get a message that the kernel is dead and in the console I see

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.

Could you please suggest a way to fix it?

polinanvkv avatar Feb 18 '21 13:02 polinanvkv

I'm having the same problem, with both TreeNode.show() and TreeNode.render(). I found another issue #296 which suggests setting the environment variable os.environ['QT_QPA_PLATFORM'] = 'offscreen'. This fixes render() for me but show() seems to hang indefinitely. The kernel outputs

This plugin does not support propagateSizeHints()

jlumpe avatar Dec 05 '21 23:12 jlumpe

Hi guys, yes, these are all problems related to the qt support in the system, as well as the availability or not of DISPLAY. Even if you are not displaying the images, qt requires a display to use the rendering directives. If that's a problem, you can always use xfvb to provide a 'fake' display port. In any case, our efforts are now put on the new ete4 branch, which includes a new web-based viz system. Mostly functional at the moment, but not yet having the same options as the treeview module.

On Mon, 6 Dec 2021 at 00:01, Michael Jared Lumpe @.***> wrote:

I'm having the same problem, with both TreeNode.show() and TreeNode.render(). I found another issue #296 https://github.com/etetoolkit/ete/issues/296 which suggests setting the environment variable os.environ['QT_QPA_PLATFORM'] = 'offscreen'. This fixes render() for me but show() seems to hang indefinitely. The kernel outputs

This plugin does not support propagateSizeHints()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etetoolkit/ete/issues/491#issuecomment-986317261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABH6SXIOOT7AATRCKS5FRLUPPVODANCNFSM4X2KGAJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jhcepas avatar Dec 11 '21 10:12 jhcepas

I get the same issue having installed the latest code on the ete4 branch.

I was able to get it to work on Ubuntu using the xfvb suggestion:

sudo apt install xvfb
xvfb-run python my_script.py

rhayes777 avatar Jan 28 '22 14:01 rhayes777

This worked for me: export QT_QPA_PLATFORM=offscreen

or if you're calling it from within Python you could do os.environ["QT_QPA_PLATFORM"] = "offscreen"

jolespin avatar Oct 27 '23 19:10 jolespin