Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error of Redis MGET #72

Open
zhengyanglu opened this issue Oct 8, 2013 · 3 comments
Open

Error of Redis MGET #72

zhengyanglu opened this issue Oct 8, 2013 · 3 comments

Comments

@zhengyanglu
Copy link

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".

@ptwobrussell
Copy link
Owner

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.

@zhengyanglu
Copy link
Author

Hi, I have the latest Redis installed which is Redis 2.6.16.

@ptwobrussell
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants