kragniz / kragniz/python-etcd3

AttributeError: 'Etcd3Client' object has no attribute 'add_watch_prefix_callback'

Open
#819 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
450
Forks
194
PR merge metrics
No merged PRs in 30d

Description

Code:
import etcd3
import etcd3.etcdrpc as etcdrpc
import etcd3.exceptions
import etcd3.utils as utils
from etcd3.client import EtcdTokenCallCredentials
etcd = etcd3.client(host='localhost',port=2379)

def watch_callback(event):
print(event)
watch_id = etcd.add_watch_prefix_callback("/foo/", watch_callback)

Message:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
8 def watch_callback(event):
9 print(event)
---> 10 watch_id = etcd.add_watch_prefix_callback("/foo/", watch_callback)

AttributeError: 'Etcd3Client' object has no attribute 'add_watch_prefix_callback'

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the example against the Etcd3Client API and inspect the existing watch-related entry points. Compare the requested add_watch_prefix_callback call with the supported public methods, then verify the expected behavior for watching the /foo/ prefix and receiving events.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.