add_config_watcher-403-error
python : 3.9 venv nacos-sdk-python 0.1.14
nacos_client = NacosClient('test.com, namespace='test' , username="nacos", password='test')
question:No need to use add_config_watcher, everything works fine. Please tell me how to deal with it.
INFO:nacos.client:[add-watcher] data_id:test_mysql, group:DEFAULT_GROUP, namespace:wei INFO:nacos.client:[add-watcher] watcher has been added for key:test_mysql+DEFAULT_GROUP+test, new callback is:on_config_change, callback number is:1 INFO:nacos.client:[init-pulling] init completed INFO:nacos.client:[add-watcher] data_id:test_redis, group:DEFAULT_GROUP, namespace:test ERROR:nacos.client:[do-pulling] exception HTTP Error 403: occur, return empty list, waiting for recovery Traceback (most recent call last): File "/Users/admin/git-workspace/test-py/venv/lib/python3.9/site-packages/nacos/client.py", line 786, in _do_pulling resp = self._do_sync_req("/nacos/v1/cs/configs/listener", headers, None, data, File "/Users/admin/git-workspace/test-py/venv/lib/python3.9/site-packages/nacos/client.py", line 728, in _do_sync_req resp = urlopen(req, timeout=timeout, context=ctx) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open response = meth(req, response) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response response = self.parent.error( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error return self._call_chain(*args) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403:
Additional information NACOS 2.3.0
更换nacos 1.3.2版本同一样的错误,有其他人遇到过吗
python的sdk的bug,跟server端没有关系。
client.py self._do_sync_req("/nacos/v1/cs/configs/listener", headers, None, data, self.pulling_timeout + 10, "POST")
param传入的是空,后面_inject_auth_info 无法把username 和password注入到参数中 ,把param设个值就好了
python的sdk的bug,跟server端没有关系。 client.py self._do_sync_req("/nacos/v1/cs/configs/listener", headers, None, data, self.pulling_timeout + 10, "POST") param传入的是空,后面_inject_auth_info 无法把username 和password注入到参数中 ,把param设个值就好了
现在v2版本的该如何呢?
0.1.16 fixed
0.1.16 fixed
OK,好吧
