nacos-group / nacos-group/nacos-sdk-python
get config error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 471
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
遇到一个奇怪的错误
/Users/xuhao/opt/anaconda3-5.3.1/anaconda3/envs/pyth_3.7_ocr/bin/python /Users/xuhao/work/SourceCode/neuron-ocr/test/testdd.py
ERROR:nacos.client:[get-config] exception update expected at most 1 arguments, got 2 occur
Traceback (most recent call last):
File "/Users/xuhao/opt/anaconda3-5.3.1/anaconda3/envs/pyth_3.7_ocr/lib/python3.7/site-packages/nacos/client.py", line 395, in get_config
resp = self._do_sync_req("/nacos/v1/cs/configs", None, params, None, timeout or self.default_timeout)
File "/Users/xuhao/opt/anaconda3-5.3.1/anaconda3/envs/pyth_3.7_ocr/lib/python3.7/site-packages/nacos/client.py", line 612, in _do_sync_req
self._inject_version_info(all_headers)
File "/Users/xuhao/opt/anaconda3-5.3.1/anaconda3/envs/pyth_3.7_ocr/lib/python3.7/site-packages/nacos/client.py", line 776, in _inject_version_info
headers.update("User-Agent", "Nacos-Python-Client:v" + VERSION)
TypeError: update expected at most 1 arguments, got 2
ERROR:nacos.client:[get-config] get config from server failed, try snapshot, data_id:neuron-common.yml, group:neuron, namespace:dev1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with nacos/client.py, especially get_config and _inject_version_info, using the traceback and test/testdd.py as the reproduction path. Confirm the request reaches the configuration endpoint without the TypeError and that the existing get-config behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100