LumaPictures / pymel

Python in Maya Done Right
Other
479 stars 130 forks source link

AssertionErrors upon initialization in Maya2014 #334

Open pmolodo opened 8 years ago

pmolodo commented 8 years ago

From Count....@gmail.com on May 20, 2013 15:41:05

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: http://code.google.com/p/pymel/issues/detail?id=301

pmolodo commented 8 years ago

From theivi...@gmail.com on October 15, 2013 12:01:13

did you ever figure this out?

pmolodo commented 8 years ago

From Count....@gmail.com on October 15, 2013 15:44:10

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':

Meatplowz commented 8 years ago

Thanks for posting. I didn't realize at first it was a WingIDE catching issue.