lastlegion / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Ubuntu error #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

# locate twitter | grep python2.5
/usr/lib/python2.5/site-packages/python_twitter-0.7_devel.egg-info
/usr/lib/python2.5/site-packages/twitter.py
/usr/lib/python2.5/site-packages/twitter.pyc
/var/lib/python-support/python2.5/twyt/twitter.py
/var/lib/python-support/python2.5/twyt/twitter.pyc

# export PYTHONPATH=/var/lib/python-support/python2.5/twyt/
# export PYTHONPATH=/usr/lib/python2.5/site-packages/

# pydoc twitter
problem in twitter - <type 'exceptions.IndentationError'>: expected an
indented block (twitter.py, line 5)

What version of the product are you using? On what operating system?

Ubuntu 8.10
Linux soc-srv-119 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
GNU/Linux
Python 2.5.2

Please provide any additional information below.

Python module installed both with apt-get install python-twyt and svn.
With this pythonpath ['/home/mcantoni/misc',
'/usr/lib/python2.5/site-packages', '/usr/lib/python25.zip',
'/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5']

#cat twit.py
#!/usr/bin/python

import twitter
tweetMsg="ciao"

api = twitter.Api(username='username',password='password')
status = api.PostUpdate(tweetMsg)

# ./twit.py
Traceback (most recent call last):
  File "./twit.py", line 3, in <module>
    import twitter
  File "/usr/lib/python2.5/site-packages/twitter.py", line 10, in <module>
    #
AttributeError: 'module' object has no attribute 'Api'

Original issue reported on code.google.com by alfonso....@gmail.com on 24 Jun 2009 at 10:17

GoogleCodeExporter commented 9 years ago
I have the same issue with MacOsX 10.5.8.

Just following the example:

import twitter
api = twitter.Api()

Produces the same error:
File "twitter.py", line 1, in <module>
    import twitter
  File "/Users/tequilamambo/Desktop/twitter.py", line 3, in <module>
    api = twitter.Api()
AttributeError: 'module' object has no attribute 'Api'

Original comment by oguerrer on 4 Mar 2010 at 10:51

GoogleCodeExporter commented 9 years ago
Your seeing a package namespace issue between two Python Twitter API modules.  
Ours uses twitter.py as well as the Twyt package (see 
http://andrewprice.me.uk/projects/twyt/ )

Not much we can do about this really IMO

Original comment by bear42 on 18 Aug 2010 at 7:42