Jump to solution
Verify

The Fix

pip install redis==7.1.0

Based on closed redis/redis-py issue #1768 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -73,7 +73,7 @@ healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(sock [docker:lots-of-pythons] name = lots-of-pythons -image = redisfab/lots-of-pythons +image = redisfab/lots-of-pythons:latest volumes =
verify
Re-run: invoke tests Re-run: invoke clean Re-run: groups
fix.md
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: Do not use this fix if you require a specific version of the Docker image.\n\n

Why This Fix Works in Production

  • Trigger: Error: No such container: master
  • Mechanism: Locking the latest tag for the pythons docker to resolve the issue with missing images.
  • Why the fix works: Locking the latest tag for the pythons docker to resolve the issue with missing images. (first fixed release: 7.1.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Triggered by an upgrade/regression window: 3.6 breaks; 7.1.0 is the first fixed release.
  • Shows up under Python 3.7.10 in real deployments (not just unit tests).
  • Surfaces as: Error: No such container: master

Proof / Evidence

  • GitHub issue: #1768
  • Fix PR: https://github.com/redis/redis-py/pull/1769
  • First fixed release: 7.1.0
  • Affected versions: 3.6
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.19

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Reopened pending feedback. But the PR merged to master should address and close this.”
@chayim · 2021-12-02 · confirmation · source
“I forgot to mention the docker version. It's version 20.10.7, build f0df350 on Amazon Linux 2. Thanks you for the quick response. The invoke devenv…”
@santosh · 2021-12-03 · source
“Can you do me a favour and remove all your docker images, as well as restarting the docker daemon? I can't reproduce this unfortunately :(”
@chayim · 2021-12-03 · source
“Taking this a step further, can you also run _invoke clean_? It may be that you have dockers in a strange state - so please…”
@chayim · 2021-12-03 · source

Failure Signature (Search String)

  • Error: No such container: master

Error Message

Stack trace
error.txt
Error Message ------------- Error: No such container: master Error: No such container: replica Error: No such container: sentinel_1 Error: No such container: sentinel_2 Error: No such container: sentinel_3 Error: No such container: redismod Error: No such container: lots-of-pythons devenv installed: astor==0.8.1,attrs==21.2.0,backports.entry-points-selectable==1.1.1,black==21.11b1,certifi==2021.10.8,charset-normalizer==2.0.8,click==8.0.3,coverage==6.2,distlib==0.3.3,docker==5.0.3,filelock==3.4.0,flake8==4.0.1,flynt==0.69,idna==3.3,importlib-metadata==4.2.0,iniconfig==1.1.1,invoke==1.6.0,isort==5.10.1,mccabe==0.6.1,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.9.0,platformdirs==2.4.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,pyparsing==3.0.6,pytest==6.2.5,pytest-cov==3.0.0,pytest-timeout==2.0.1,regex==2021.11.10,requests==2.26.0,six==1.16.0,toml==0.10.2,tomli==1.2.2,tox==3.24.4,tox-docker==3.1.0,typed-ast==1.5.0,typing_extensions==4.0.1,ujson==4.3.0,urllib3==1.26.7,virtualenv==20.10.0,vulture==2.3,websocket-client==1.2.1,zipp==3.6.0 devenv docker: pull 'redisfab/redis-py:6.2.6-buster' (from 'master') ___________________________________ summary ____________________________________ devenv: commands succeeded congratulations :) Traceback (most recent call last): File "/efs/repos/redis-py/.venv/lib64/python3.7/site-packages/docker/api/client.py", line 268, in _raise_for_status ... ... (truncated) ...
Stack trace
error.txt
Error Message ------------- $ invoke tests Starting Redis tests GLOB sdist-make: /efs/repos/redis-py/setup.py standalone-plain inst-nodeps: /efs/repos/redis-py/.tox/.tmp/package/2/redis-4.1.0rc2.zip standalone-plain installed: astor==0.8.1,attrs==21.2.0,backports.entry-points-selectable==1.1.1,black==21.11b1,certifi==2021.10.8,charset-normalizer==2.0.8,click==8.0.3,coverage==6.2,Deprecated==1.2.3,distlib==0.3.3,docker==5.0.3,filelock==3.4.0,flake8==4.0.1,flynt==0.69,idna==3.3,importlib-metadata==4.2.0,iniconfig==1.1.1,invoke==1.6.0,isort==5.10.1,mccabe==0.6.1,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.9.0,platformdirs==2.4.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,pyparsing==3.0.6,pytest==6.2.5,pytest-cov==3.0.0,pytest-timeout==2.0.1,redis @ file:///efs/repos/redis-py/.tox/.tmp/package/2/redis-4.1.0rc2.zip,regex==2021.11.10,requests==2.26.0,six==1.16.0,toml==0.10.2,tomli==1.2.2,tox==3.24.4,tox-docker==3.1.0,typed-ast==1.5.0,typing_extensions==4.0.1,ujson==4.3.0,urllib3==1.26.7,virtualenv==20.10.0,vulture==2.3,websocket-client==1.2.1,wrapt==1.13.3,zipp==3.6.0 standalone-plain docker: run 'redisfab/redis-py:6.2.6-buster' (from 'master') ___________________________________ summary ____________________________________ standalone-plain: commands succeeded ERROR: standalone-hiredis: undefined ERROR: cluster-plain: undefined ERROR: cluster-hiredis: undefined Traceback (most re ... (truncated) ...
Stack trace
error.txt
Error Message ------------- $ invoke clean master replica sentinel_1 sentinel_2 sentinel_3 redismod lots-of-pythons redis_cluster (.venv) ec2-user at ip-10-2-1-250 in /efs/repos/redis-py (master) $ groups ec2-user adm wheel systemd-journal docker (.venv) ec2-user at ip-10-2-1-250 in /efs/repos/redis-py (master) $ invoke devenv Error: No such container: master Error: No such container: replica Error: No such container: sentinel_1 Error: No such container: sentinel_2 Error: No such container: sentinel_3 Error: No such container: redismod Error: No such container: lots-of-pythons Error: No such container: redis_cluster devenv installed: astor==0.8.1,attrs==21.2.0,backports.entry-points-selectable==1.1.1,black==21.11b1,certifi==2021.10.8,charset-normalizer==2.0.8,click==8.0.3,coverage==6.2,distlib==0.3.3,docker==5.0.3,filelock==3.4.0,flake8==4.0.1,flynt==0.69,idna==3.3,importlib-metadata==4.2.0,iniconfig==1.1.1,invoke==1.6.0,isort==5.10.1,mccabe==0.6.1,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.9.0,platformdirs==2.4.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,pyparsing==3.0.6,pytest==6.2.5,pytest-cov==3.0.0,pytest-timeout==2.0.1,regex==2021.11.10,requests==2.26.0,six==1.16.0,toml==0.10.2,tomli==1.2.2,tox==3.24.4,tox-docker==3.1.0,typed-ast==1.5.0,typing_extensions==4.0.1,ujson==4.3.0,urllib3==1.26.7,virtualenv==20.10.0,vulture==2.3,websocket-client==1.2.1,zipp==3.6.0 devenv docker: r ... (truncated) ...

Environment

  • Python: 3.7.10

What Broke

The development environment setup fails, preventing local development and testing.

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install redis==7.1.0

When NOT to use: Do not use this fix if you require a specific version of the Docker image.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Option D — Guard side-effects with OnceOnly Guardrail for side-effects

Mitigate duplicate external side-effects under retries/timeouts/agent loops by gating the operation before calling external systems.

  • Place OnceOnly between your code/agent and real side-effects (Stripe, emails, CRM, APIs).
  • Use a stable key per side-effect (e.g., customer_id + action + idempotency_key).
  • Fail-safe: configure fail-open vs fail-closed based on blast radius and spend risk.
Show example snippet (optional)
onceonly.py
from onceonly import OnceOnly import os once = OnceOnly(api_key=os.environ["ONCEONLY_API_KEY"], fail_open=True) # Stable idempotency key per real side-effect. # Use a request id / job id / webhook delivery id / Stripe event id, etc. event_id = "evt_..." # replace key = f"stripe:webhook:{event_id}" res = once.check_lock(key=key, ttl=3600) if res.duplicate: return {"status": "already_processed"} # Safe to execute the side-effect exactly once. handle_event(event_id)

See OnceOnly SDK

When NOT to use: Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

Fix reference: https://github.com/redis/redis-py/pull/1769

First fixed release: 7.1.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • Do not use this fix if you require a specific version of the Docker image.
  • Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

Verify Fix

verify
Re-run: invoke tests Re-run: invoke clean Re-run: groups

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
  • Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.

Version Compatibility Table

VersionStatus
3.6 Broken
7.1.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.