title: How to find source of error in Python Pickle on massive object
body: <p>I've taken over somebody's code for a fairly large project. I'm trying to save program state, and there's one massive object which stores pretty much all the other objects. I'm trying to pickle this object, but I get this error:</p>
  
  <blockquote>
    <p>pickle.PicklingError: Can't pickle : it's not found as <strong>builtin</strong>.module</p>
  </blockquote>
  
  <p>From what I can find on google, this is because somewhere I'm importing something outside of python init, or that a class attribute is referencing a module. So, I've got a two questions:</p>
  
  <ol>
  <li><p>Can anybody confirm that that's why this error is being given? Am I looking for the right things in my code?</p></li>
  <li><p>Is there a way to find what line of code/object member is causing the difficulties in pickle? The traceback only gives the line in pickle where the error occurs, not the line of the object being pickled.</p></li>
  </ol>