← Back to team overview

yade-dev team mailing list archive

Re: yade-multi with qt

 

> Hello,
> 
> when I use yade-multi on a script containing line "from yade import qt", it fails.. if I delete this line, everything is OK. Is this a bug or not?

Not a bug, although it is probably not documented. The qt module is
supposed to fail at import if there is not able to initialize (open the
display); use block like:

try:
	from yade import qt
	# do qt stuff here
except ImportError: pass # nothing happens if there is no display, such as in batch

Cheers, Václav

> 
> regards,
> Jan
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
> 





References