code-google-com / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

AssertionErrors upon initialization in Maya2014 #301

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There are 4 AssertionErrors in factories.py upon importing pymel in Maya2014 if 
a debugger (like WingIDE) is connected:

AssertionError:MTransformationMatrix.rotateBy(): q: invalid input type 
MQuaternion

AssertionError:MTransformationMatrix.setRotationOrientation(): q: invalid input 
type MQuaternion

AssertionError:MTransformationMatrix.rotationOrientation(): invalid return 
type: MQuaternion

Using Maya 2014 on Win7 64-bit and PyMEL 1.0.5

Error occurs in factories.py ~ 1465:

assert  returnType in ApiTypeRegister.outCast or \
                            returnType == self.apiClassName, \
                    '%s.%s(): invalid return type: %s' % (self.apiClassName, self.methodName, returnType)

Error occurs in factories.py ~ 1476:

assert  argtype in ApiTypeRegister.inCast or \
                            defaults.has_key(argname) or \
                            argtype == self.apiClassName, \
                    '%s.%s(): %s: invalid input type %s' % (self.apiClassName, self.methodName, argname, argtype)

Maya and PyMEL continue to boot fine after this though and work normally. Just 
really annoying that these are caught every time I restart Maya and am 
debugging my environment setup process.

Original issue reported on code.google.com by Count....@gmail.com on 20 May 2013 at 10:41

GoogleCodeExporter commented 9 years ago
did you ever figure this out?

Original comment by theivi...@gmail.com on 15 Oct 2013 at 7:01

GoogleCodeExporter commented 9 years ago
Yep,

added this right before the (a)ssert on ~line 1465:
if not self.apiClassName == 'MTransformationMatrix' and not returnType == 
'MQuaternion':

and this right before the (a)ssert on ~line 1476:
if not self.apiClassName == 'MTransformationMatrix':

Original comment by Count....@gmail.com on 15 Oct 2013 at 10:44