Isotropix Forums

Error When trying to import Pyside.Gui

Clarisse Scripting related topics

Error When trying to import Pyside.Gui

Unread postby mikeporetti » Fri Aug 31, 2018 6:28 am

import sys

import PySide
from PySide.QtGui import QApplication
from PySide.QtGui import QMessageBox

projectName = "Test"

app = None
if not QApplication.instance(): #QtApplication doesn't exist
app = QApplication(sys.argv)
app = QApplication.instance()

# Create a simple dialog box
msgBox = QMessageBox()
msgBox.setText("Project " + projectName)

Tried runinng the code above and got this:

Traceback (most recent call last):
File "<string>", line 4, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.

help pls
Posts: 7
Joined: Thu Jan 28, 2016 10:29 pm

Re: Error When trying to import Pyside.Gui

Unread postby bvaldes » Fri Aug 31, 2018 9:05 am


You should take a look to the SDK doc about using QT with Clarisse. It's not online so I can't give you a direct link but press F1 inside of Clarisse to open the local doc and the go to Reference in the menu, then click on Scripting/API. In the SDK doc you have a section called `Using Qt through Python in Clarisse`.

By the way did you try to run PySide in a terminal? It could be an issue from your PySide instalation.

Clarisse QA
User avatar
Posts: 265
Joined: Mon Sep 26, 2016 11:44 am

Return to Scripting