larksuite / larksuite/oapi-sdk-python
py3.12 报错 FileFinder' object has no attribute 'find_module'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 559
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
File "/data/run/data_agent/utils/fs_utils.py", line 3, in
import lark_oapi as lark
File "/usr/local/lib/python3.12/dist-packages/lark_oapi/init.py", line 1, in
from . import ws
File "/usr/local/lib/python3.12/dist-packages/lark_oapi/ws/init.py", line 1, in
from .client import Client
File "/usr/local/lib/python3.12/dist-packages/lark_oapi/ws/client.py", line 22, in
from lark_oapi.ws.pb.google.protobuf.internal.containers import RepeatedCompositeFieldContainer
File "/usr/local/lib/python3.12/dist-packages/lark_oapi/ws/pb/google/init.py", line 2, in
import('pkg_resources').declare_namespace(name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2280, in declare_namespace
declare_namespace(parent)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2280, in declare_namespace
declare_namespace(parent)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2280, in declare_namespace
declare_namespace(parent)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2296, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2213, in _handle_ns
loader = importer.find_module(packageName)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FileFinder' object has no attribute 'find_module'
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 by reproducing the Python 3.12 import from data_agent/utils/fs_utils.py, line 3, and follow the traceback through lark_oapi and its bundled google package. Check the namespace-loading call involving pkg_resources and FileFinder. Done means importing lark_oapi succeeds on Python 3.12 without the find_module error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100