RedisGraph / redisgraph-py

RedisGraph python client
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
189 stars 49 forks source link

Unknown command error #24

Closed XufengXufengXufeng closed 5 years ago

XufengXufengXufeng commented 5 years ago

OS: Ubuntu 16 python: 3.6 redis: 2.8.19

I am new to redis graph. I don't know where else I can find help.

I followed the Example: Using the Python Client on the title page of this repo. I can't get anything running. Every command, "graph.delete", "graph.commit", "graph.query", are unknown. If anyone, please help.

Thank you.

swilly22 commented 5 years ago

@XufengXufengXufeng seems like you haven't loaded redisgraph to Redis,

Please try running redisgraph using docker: docker run -p 6379:6379 -it --rm redislabs/redisgraph

Then connect to it using redisgraph-py

Glitchfix commented 5 years ago

You could either use the solution mentoined by @swilly22 or load the module directly to make it work

~/$ redis-server --loadmodule /path/to/module/src/redisgraph.so
XufengXufengXufeng commented 5 years ago

Thank you @Glitchfix @swilly22 , I can't use docker right now. While I have tried:

~/$ redis-server --loadmodule /path/to/module/src/redisgraph.so

I got the "Bad directive or wrong number of arguments" error. I am sure my path was correct, as I could cd and vim the path without any problem.

Do you guys know the fix to this redis problem?

Thank you.

Glitchfix commented 5 years ago

@XufengXufengXufeng Make sure you have Redis 4.0+ to use. I have Redis 5.0.2 and it works fine with it. You can check your version using redis-server --version I'd reccommend you to update to the latest stable version if you are running an older version.

XufengXufengXufeng commented 5 years ago

I am so sorry, there was a typo or something. It works now.

Although I tried to add one line to the "loadmodule /path/to/module/src/redsigraph.so" to redis.conf file, it didnot load the module like what I imagined.

Glitchfix commented 5 years ago

@XufengXufengXufeng are you able to query now?

XufengXufengXufeng commented 5 years ago

Yes, sorry for the late reply. You may close this thread. @Glitchfix

I have to install redis and redisgraph properly before I use redisgraph-py.