Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

This is the code that I use to access Stack Overflow:

from stackexchange import Site, StackOverflow
so = stackexchange.StackOverflow()
for q in so.questions(pagesize=50):
    print q.title

It runs fine when I copy and paste it on the command shell. But running it in IDLE gives the following error:

Traceback (most recent call last):
  File "C:\Users\Animesh\Desktop\NLP\metastack.py", line 3, in <module>
    from stackexchange import Site, StackOverflow
  File "C:\Users\Animesh\Desktop\stackexchange.py", line 4, in <module>
AttributeError: 'module' object has no attribute 'StackOverflow'

How should I correct it?

share|improve this question
Do you have a stackexchange.py file in your local directory? Test with import stackexchange; print stackexchange.__file__`. –  Martijn Pieters Mar 6 '13 at 16:28
Which Python wrapper are you using? –  Nathan Osman Mar 9 '13 at 4:54

You must log in to answer this question.

Browse other questions tagged .