module 'pickle' has no attribute 'dump'

后端 未结 2 1116
孤独总比滥情好
孤独总比滥情好 2021-02-19 21:40
import pickle

imelda = (\'More Mayhem\',
          \'IMelda May\',
          \'2011\',
          ((1, \'Pulling the Rug\'),
           (2, \'Psycho\'),
           (3, \         


        
2条回答
  •  时光说笑
    2021-02-19 21:58

    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.

提交回复
热议问题