Mining-the-Social-Web
Mining-the-Social-Web copied to clipboard
Error of Redis MGET
In the friends_followers__calculate_avg_influence_of_followers.py, there is: followers = r.mget([getRedisIdByUserId(follower_id, 'info.json') for follower_id in follower_ids]).
However, when I run the script, it gave me "wrong number of arguments for 'mget' command".
Can you tell me the version of Redis that you are running? Most likely, you're using a newer version in which the API has changed. I'm happy to help you work through this problem, but could I also recommend checking out Mining-the-Social-Web-2nd-Edition that's available at https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition ?
Some screencasts are available that are designed to help you get started - https://vimeo.com/channels/MiningTheSocialWeb - and I think you'll find that it's a considerably better project and a much simpler codebase and set of technologies to work with if you are interested in the social web mining space.
Hi, I have the latest Redis installed which is Redis 2.6.16.
It appears as though the MGET command is the same in 2.6 as it has always been since 1.0. My recommendation would be to add some logging that prints out some values to see what is being returned and passed into r.mget like this:
import sys
print >> sys.stderr, follower_ids
for follower_id in follower_ids:
print >> sys.stderr, getRedisIdByUserId(follower_id, 'info.json')
Let me know what that returns, and we can work from there.