python 2.7 - Tweepy: ImportError: cannot import name Random -
i'm using tweepy send messages twitter. i'm getting long traceback api. traceback settles at:
importerror: cannot import name random i used pip install latest version of tweepy:
name: tweepy version: 2.3.0 location: /system/library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages requires: when call
import tweepy i traceback:
traceback (most recent call last): file "/users/dromard/projects/drop playlist/drop.py", line 4, in <module> import tweepy file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/tweepy/__init__.py", line 14, in <module> tweepy.api import api file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/tweepy/api.py", line 8, in <module> tweepy.binder import bind_api file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/tweepy/binder.py", line 5, in <module> import httplib file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 79, in <module> import mimetools file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/mimetools.py", line 6, in <module> import tempfile file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/tempfile.py", line 35, in <module> random import random _random importerror: cannot import name random process finished exit code 1 i'm working in pycharm , confirmed site package , python paths correct in settings. manually checked in console paths correct, , there no duplicate locations.
i haven't made changes tweepy. let pip install is, is. permissions correct:
-rw-r--r-- 1 root wheel if check python in console:
- same traceback
- when run individual imports, execute without error
it fails out @ random call. think random part of python's core packages, , not part of tweepy.
i handed script off co-worker, used pip install tweepy , hit same traceback. makes me think pip might contributing.
i'm relatively new python (programming in general). looked through other 'import error' articles, didn't find specific issue. appreciated.
i figured out. had created python file called 'random.py' during course of experimenting random number generating script. 'import random' call grabbing file, lacked library random. created conflict proper 'random.'
Comments
Post a Comment