import pickle
imelda = (\'More Mayhem\',
\'IMelda May\',
\'2011\',
((1, \'Pulling the Rug\'),
(2, \'Psycho\'),
(3, \
You might have used your Python file name as pickle.py
. Python interpreter is confused and looking for dump function in you file pickle.py
instead of the package you have imported. Change the name of your file to something else, it will work.
Happened to me too. I had a file called pickle.py
in my current directory. Just rename it and it's fixed :)