Python - Segfault on mocha.project Import

I was just trying the Python side of things for MochaPro but I’m a little confused as to how to start. I’ve had a look at the mocha-Pro-Python-Guide.pdf and tried to import mocha.project using the Python in the installed mocha 4.1.0 folder but I get a segfault every time… Is there something I’m missing?

I’m on Linux CentOS 6.4

 

Hi there,

You’re probably going to have to email us on this one. Please email the error you’re getting and a screenshot to maryp@imagineersystems.com

 

Cheers,
Mary

Thanks Mary. Email Sent :slight_smile:

 

Cheers,

Colin

Just for the benefit of other users with this problem:

This is due to a defect on linux systems that requires the loading of QtCore before importing other modules. We will be addressing this issue in a later point release.

To work around the problem, simply import QtCore first:

from PySide import QtCore
from mocha.project import Project

You should no longer get the seg fault as long as the highlighted line is added first.