PDA

View Full Version : Python Error


EightBit
01-07-2011, 01:33 PM
I receive this error when I attempt to run a pymel script:
# Error: TypeError: __init__() takes at most 2 arguments (4 given) #
I've been working on this script for months and have never encountered this error before (at least I didn't notice it). When I run some of my older versions, I get the same error. I don't have an __init__ command or use any custom classes.
I have 2 import statements:
import pymel.core as pm
import cPickle as Pickle
Any suggestions for fixing this would be greatly appreciated.

Phlok
01-07-2011, 03:15 PM
It seems like you are handing over too many arguments to a function. This function is defined outside of your code (you stated you didn't create own classes) and this is creating an instance of a class.

Doing so, __init__ (something like a default constructor) is called, but with an illegal number of arguments.

EightBit
01-07-2011, 03:43 PM
Thanks. It was a user error - I messed up a scene file which cause the problem when calling Pickle...

CGTalk Moderation
01-07-2011, 03:43 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.