From 02fd71fe58154bb46d5deba413b26c8c385e45ab Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Fri, 11 Sep 2015 15:46:17 +0200 Subject: [PATCH] Fixes "could not create shader program" #385 For any reason this problem seems to be Ubuntu-specific and is also present since pyqt4. * Updated the #131 pull request and added platform.linux_distribution to check for "Ubuntu" * Added notice about the bug report above the if-clause * Added comment why is needed --- cura/CuraApplication.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 811e879207..1697cc020e 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1,6 +1,13 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. +import platform + +if platform.system() == "Linux": # Needed for platform.linux_distribution, which is not available on Windows and OSX + # For Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826 + if platform.linux_distribution()[0] in ("Ubuntu", ): # Just in case it also happens on Debian, so it can be added + from OpenGL import GL + from UM.Qt.QtApplication import QtApplication from UM.Scene.SceneNode import SceneNode from UM.Scene.Camera import Camera