ptwobrussell / Mining-the-Social-Web

The official online compendium for Mining the Social Web (O'Reilly, 2011)
http://bit.ly/135dHfs
Other
1.21k stars 491 forks source link

Issue with 'the_tweet_harvest_timeline.py' code #10

Closed digitalpaula closed 12 years ago

digitalpaula commented 12 years ago

Hi Matthew,

First of all I love the book Mining the Social Web and been working through the examples. I tried to run the harvest script and get the following error:

error: [Errno 10061] No connection could be made because the target machine actively refused it

Any ideas why connection is being refused?

I'm running python 27 on a windows 7 machine.

Thanks.

Regards, Paula

ptwobrussell commented 12 years ago

Hi - I'm assuming that the line that's failing is the call to connect to CouchDB: couchdb.Server('http://localhost:5984') ?

Unfortunately, I don't have access to Windows 7, nor have I ever used it. However, if I were to guess, the issue is something I bet that you can debug without too much headache, so I'll just throw out some ideas (which again, are just things I'm reaching for since I really have no idea what Windows may be doing.)

Are you able to access CouchDB's admin page at http://localhost:5984/_utils in your web browser? If so, then you know for sure that CouchDB is up and running and that it can be accessed as expected. If this is the case then perhaps something related to your Windows firewall settings is preventing local (untrusted?) clients from initiating a connection? If you have telnet installed on your machine (which may or may not be on Windows 7 - I have no idea), you could try to telnet to localhost on port 5984. You could also try to ping localhost and see what happens? Or try 127.0.0.1 instead of localhost

digitalpaula commented 12 years ago

Thanks for the prompt response Matthew!

Ok, I can't connect to http://localhost:5984, get an error. In fact, I get an error when trying to just go to http://localhost. I can ping localhost but not sure why it doesn't show in browser. I'll have to figure out what's going there.

Oh, I did comment out the db code in the script and the code worked liked a charm in fetching tweets. Now all I have to do is figure out what's going on with my localhost not rendering in the browser then I'll be on my way!

Thanks again and if you have any thoughts on getting localhost to work in browser I'd appreciate it. :) Also, wondering if you can provide the exact code to telnet to localhost on port 5984.

Regards, Paula

digitalpaula commented 12 years ago

Matthew, it's for sure a configuration with my IIS (web server) on windows 7. I'll engage the CouchDB folks. Thanks so much.