Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

py3.12 报错 FileFinder' object has no attribute 'find_module'

Open
#114 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

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'

Dominant language
Python
Stars
560
Forks
102
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from larksuite/oapi-sdk-python

All issues in larksuite/oapi-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.