Closed kamadorueda closed 3 years ago
@kamadorueda I need to know what version of the library you are running, what redis-server version and what redis-py version you ran. And if possible the piece of code that you ran and if you can reproduce this reliably in some way?
@kamadorueda From a quick look you are using an older version of this lib and you should upgrade it as if you look inside master branch here https://github.com/Grokzen/redis-py-cluster/blob/master/rediscluster/client.py#L703 you will see that a fix was added that will check if connection variable is set and it might help to avoid this issue. Also if you look here https://github.com/Grokzen/redis-py-cluster/blob/master/rediscluster/client.py#L590 you will see that the variable should no longer be unbound as it should be set to None by default and avoid this case that you encounter.
I hit the bug in a very extreme corner case (last version of the library on pypi)
I think it was because I had locally a redis-server instead of a redis-cluster and that is supposed to fail, and it failed, so I'm ok with that
Finally I used a local redis-cluster and it worked very well, actually this library is the one that allowed me to solve this issue: https://gitlab.com/fluidattacks/product/-/issues/3874
I don't think it's worth keeping the issue open as the behaviour on real use cases is correct
Thanks!
Hello guys, I've been playing with the library a little, but it seems we have an unbound variable on edge-cases:
Seems like on error conditions, the variable has not been declared (depending on the try-catch flows):