Recursion problems using Python

I have been dealing for a couple of days with recursion problems when dumping data using pickle. The solution that I have used has been pretty simple but effective: just to increment the recursion limit by doing:

sys.setrecursionlimit(10000)

Since I have set up this new recursion limit, I have not had any recursion problems again.