Skip to content

[Bug] [Python] Outdated python lib used on agent startup #13030

@henriquemeca

Description

@henriquemeca

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

OAP server (apache/skywalking)

What happened

I tried to start the django server with sw-python, but it failed in a setup step:

uv run sw-python run python -m manage runserver 0.0.0.0:8000

2025-02-12 09:03:40 skywalking-loader [pid:28] [MainThread] [ERROR] SkyWalking Python Agent failed to start, please inspect your package installation.Report issue if you think this is a bug, along with the log produced by specifying the -d debug flag.
2025-02-12 09:03:40 Traceback (most recent call last):
2025-02-12 09:03:40 File "/src/.venv/lib/python3.13/site-packages/skywalking/bootstrap/loader/sitecustomize.py", line 168, in
2025-02-12 09:03:40 agent.start() # CHECK: Not sure what happens when supervisor + gunicorn is used? Will it even work?
2025-02-12 09:03:40 ~~~~~~~~~~~^^
2025-02-12 09:03:40 File "/src/.venv/lib/python3.13/site-packages/skywalking/agent/init.py", line 244, in start
2025-02-12 09:03:40 plugins.install()
2025-02-12 09:03:40 ~~~~~~~~~~~~~~~^^
2025-02-12 09:03:40 File "/src/.venv/lib/python3.13/site-packages/skywalking/plugins/init.py", line 44, in install
2025-02-12 09:03:40 plugin = importer.find_module(modname).load_module(modname)
2025-02-12 09:03:40 ^^^^^^^^^^^^^^^^^^^^
2025-02-12 09:03:40 AttributeError: 'FileFinder' object has no attribute 'find_module'
2025-02-12 09:03:40 Watching for file changes with StatReloader

What you expected to happen

Apparently a the find_module was removed in python 3.12.
I believe the python agent needs an updated to newer python versions

How to reproduce

https://github.com/henriquemeca/skywalking-python-agent-issue
Follow the readme for setup

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Assignees

Labels

featureNew featurepythonPython agent related

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions