larksuite / larksuite/oapi-sdk-python
AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 559
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
版本: 1.5.3
报错日志:
lib/python3.12/site-packages/lark_oapi/ws/pb/google/init.py", line 2, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
2026年开始Setuptools 81.0.0+ 删除了 pkg_resources.declare_namespace
临时解决方案:
pin setuptools版本:
setuptools<81
或者手工改下代码ws/pb/google/init.py
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 ws/pb/google/init.py and reproduce the import failure using setuptools 81.0.0 or newer with Python 3.12. Check the package’s namespace initialization there and verify that installing version 1.5.3 no longer raises AttributeError without requiring a setuptools pin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100