Tweepy: ImportError: cannot import name Random

前端 未结 2 747
萌比男神i
萌比男神i 2020-12-17 14:14

I\'m using Tweepy to send some messages to Twitter. I\'m getting a long traceback from the API. The traceback settles at:

ImportError: cannot import name Ran         


        
2条回答
  •  情歌与酒
    2020-12-17 14:56

    I figured this out. I had created a python file called 'random.py' during the course of experimenting with a random number generating script. My 'import random' call was grabbing this file, which lacked the library Random. It essentially created a conflict with the proper 'random.'

提交回复
热议问题