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

Redis Blues #54

Closed terminator1 closed 11 years ago

terminator1 commented 11 years ago

Hi Matthew,

Here is my situation:

So when I run friends_followers__redis_to_networkx.py (from the repository of course) I get the following error:

Traceback (most recent call last): File "C:\Python27\python_code\friends_followers__redis_to_networkx.py", line 22, in friend_ids = list(r.smembers(getRedisIdByScreenName(SCREEN_NAME, 'friend_ids'))) File "C:\Python27\lib\site-packages\redis-2.7.5-py2.7.egg\redis\client.py", line 1075, in smembers return self.execute_command('SMEMBERS', name) File "C:\Python27\lib\site-packages\redis-2.7.5-py2.7.egg\redis\client.py", line 381, in execute_command connection.send_command(_args) File "C:\Python27\lib\site-packages\redis-2.7.5-py2.7.egg\redis\connection.py", line 299, in send_command self.send_packed_command(self.pack_command(_args)) File "C:\Python27\lib\site-packages\redis-2.7.5-py2.7.egg\redis\connection.py", line 281, in send_packed_command self.connect() File "C:\Python27\lib\site-packages\redis-2.7.5-py2.7.egg\redis\connection.py", line 229, in connect raise ConnectionError(self._error_message(e)) ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

I'm practically stuck at this point because I don't know where to go to open up the redis console and begin to change the port/configure redis etc.

I know that there are some redis files under the Python directory that has connection.py and init.py etc. I tried running those to make sure the redis service was started and connected but it doesn't change anything. Wondering if I'm completely in the wrong place in regards to redis.

Can you config redis directly from the Python GUI or do you need open another console (and where would that be?)

Thanks much!

ptwobrussell commented 11 years ago

You will definitely need to find where Redis is installed in order to start it up. Only from there can you connect a client to it (like from Python.) I work in a Mac OS X and Linux environment and don't have access to Windows, or I'd try to be more helpful here. I've just never worked with Redis or many other tools on Windows, so I'm of very limited use to you here.

Your best bet for Redis on Windows might be here: https://github.com/MSOpenTech/redis/tree/2.6/bin/release

And you could probably also open issues about Redis specific questions there and get good support on getting it up and running (though, I'd recommend checking their docs first off of the main page https://github.com/MSOpenTech/redis/

terminator1 commented 11 years ago

Hi Matthew,

It seems that the microsoft link worked, so I'm fine for the time being. Feel free to close this issue.

I have an unrelated question about your facebook code in the book. Can you use it to mine the profiles that "liked" your facebook business page?

It seems like its only applicable to a personal facebook page where you have friends.

Thanks!

ptwobrussell commented 11 years ago

I'd have to double check, but I'm not sure off the top of my head that you can mine out the individual user identifies who "like" any given business page although you can definitely mine out a lot of useful information about a business page, but you might be able to do this for your particular business page since you are the owner. I'll look into this, though. Ping me back in a day or so and I might have an answer for you.

Have you been looking at the code for the 2nd Edition? You might benefit from it a lot more than the 1st Edition at this point since the chapters on Twitter and Facebook are pretty solid by now - https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition

terminator1 commented 11 years ago

Just following up with @ptwobrussell in regards to analyzing the likes off of a facebook business page.

I really think that the book should focus its attention on facebook in this respect. Analyzing a personal facebook page is nice, but in terms of creating real business value for readers, analyzing the community around your business page and the community around your competitor is VERY powerful!!