pyside issue

275 views
Skip to first unread message

Todd Widup

unread,
Feb 10, 2014, 7:19:00 PM2/10/14
to python_in...@googlegroups.com
#     return shiboken.wrapInstance(long(ptr), QtGui.QMainWindow)
# TypeError: You need a shiboken-based type. #

I am getting this in Maya 2014 on ever pyside gui that I try. 
Shiboken is importing fine...so what would cause this?

--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

Justin Israel

unread,
Feb 11, 2014, 12:45:06 AM2/11/14
to python_in...@googlegroups.com

I forget. Do they include shiboken Python libs with 2014 or did you have to build them?

Does it do this directly from the script editor when you just import PySide and Shiboken, and try to wrap the Maya main window?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35xE%3Du6zN8T1Z3XNyT29CxCb%2Bm1WSF1kTbyMhb7%3D0gAYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Todd Widup

unread,
Feb 11, 2014, 1:33:06 AM2/11/14
to python_in...@googlegroups.com, python_in...@googlegroups.com
Doesn't error on import so assuming its included. 

Directly in the script editor or on import

Sent from my tiny iPad with big fingers

Justin Israel

unread,
Feb 11, 2014, 1:59:12 AM2/11/14
to python_in...@googlegroups.com

I'm not really sure but I was getting at trying to see if you somehow have an old shiboken you built, importing and being used with a newer PySide.
If you print the shiboken and PySide modules do they both show up as being located in the Maya site-packages?

Todd Widup

unread,
Feb 11, 2014, 3:13:58 AM2/11/14
to python_in...@googlegroups.com, python_in...@googlegroups.com
Ill check it once I'm in the office tomorrow. 

They should be.  I can't think of any place it might get them from


Sent from my tiny iPad with big fingers

Justin Israel

unread,
Feb 11, 2014, 4:26:33 AM2/11/14
to python_in...@googlegroups.com

Yea im just lobbing Hail Mary guesses.

David Moulder

unread,
Feb 11, 2014, 4:44:31 AM2/11/14
to python_inside_maya
I've seen this before when PyQt4 has already been imported and your mixing PySide in.  Be sure that  QtGui.QMainWindow is from the PySide modules.  Print the __file__ attr for that before hand.



For more options, visit https://groups.google.com/groups/opt_out.

Nils Lerin

unread,
Feb 12, 2014, 5:02:36 PM2/12/14
to python_in...@googlegroups.com
I run the following code successfully on Maya 2014 x64, did you check your version of shiboken? shiboken.__version__ says 1.1.1 for me

import shiboken
from PySide import QtGui
import maya.OpenMayaUI as _OpenMayaUI
ptr = _OpenMayaUI.MQtUtil.mainWindow()
mainWindow = shiboken.wrapInstance(long(ptr), QtGui.QMainWindow)
mainWindow.showMinimized()


Todd Widup

unread,
Feb 12, 2014, 5:14:50 PM2/12/14
to python_in...@googlegroups.com
yeah even that errors with # TypeError: You need a shiboken-based type. #

shiboken is 1.1.1 as well  
someone else pointed me to a wrapInstance function that handles sip and shiboken, and it does the same. 

and checking the type on QtGui.QMainWindow just before the shiboken call its showing it as # Result: <type 'Shiboken.ObjectType'> #
had an office mate run it, and it just minimized his maya window.  

hmm, maybe I will blow away my prefs and see 



For more options, visit https://groups.google.com/groups/opt_out.



--

Marcus Ottosson

unread,
Feb 18, 2014, 3:19:21 PM2/18/14
to python_in...@googlegroups.com
Did you find the cause of this problem?

I just had the same issue.

I've been lobbying a bit with a PyQt4, putting it amongst the Maya install files and such so I wouldn't be surprised if there was remnants of it messing about yet I couldn't nail down the cause.

Cleared preferences didn't have any effect, neither did a fresh install on the same computer. On a fresh OS install (Windows 8) however it works fine.





For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Todd Widup

unread,
Feb 18, 2014, 3:42:44 PM2/18/14
to python_in...@googlegroups.com
nah...tracked it down to something on my machine specifically as pyside code runs on everyone elses...just haven't had time to get back in and see.  have a feeling its an env someplace that was set by a one of the studios I work with.



For more options, visit https://groups.google.com/groups/opt_out.

Marcus Ottosson

unread,
Feb 25, 2014, 4:47:45 PM2/25/14
to python_in...@googlegroups.com
Hey, have you made any progress in this area?

I eventually had to jump ship and head back into PyQt land for this. Posted a link to a Windows compile here.



For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Todd Widup

unread,
Feb 25, 2014, 5:31:02 PM2/25/14
to python_in...@googlegroups.com
no, just narrowed it down to my system is all.  haven't had a chance to get back and start sorting thru it more.  I did talk to a counter-part of mine at one of our studios and he had ran into it before, but couldn't recall the fix.



For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages