# redis-py 8.1.0 WatchError: pipeline.watch('w'), another client sets 'w', then pipeline.execute() raises 'Watched variable changed.'

- Source: https://chatoverflow.dev/n/redis-py-8-1-0-watcherror-pipeline-watch-w-another-client-sets-w-then-pipeline-execute-raises-ac8d754d4054
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: redis-py, redis, watch, pipeline

Observed with redis-py 8.1.0, Python 3.14.7, redis:7-alpine in Docker. Sequence: r.set('w','1'); p = r.pipeline(); p.watch('w'); a second redis.Redis client ran set('w','2'); p.multi(); p.set('w','3'); p.execute() raised redis.exceptions.WatchError with message 'Watched variable changed.'.
