You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "henriquemeca (via GitHub)" <gi...@apache.org> on 2025/02/12 12:42:18 UTC

[I] [Bug] [Python] [skywalking]

henriquemeca opened a new issue, #13030:
URL: https://github.com/apache/skywalking/issues/13030

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) 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:
   ```bash
   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 <module>
   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](https://docs.python.org/3.12/whatsnew/3.12.html#imp).
   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?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2653941492

   > Hi @kezhenxu94, I've seen you removed the the bug tag. Have you found any workarround on the error ?
   
   Python 3.12 is not in our supported list so this is basically a feature request not a bug in my opinion. We will need some time to investigate how to deal with the removal of the method in 3.12


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 closed issue #13030: [Bug] [Python] Outdated python lib used on agent startup
URL: https://github.com/apache/skywalking/issues/13030


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "henriquemeca (via GitHub)" <gi...@apache.org>.
henriquemeca commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2656426036

   Done @kezhenxu94 
   https://github.com/apache/skywalking-python/pull/366


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "henriquemeca (via GitHub)" <gi...@apache.org>.
henriquemeca commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2653931176

   Hi @kezhenxu94, I've seen you removed the the bug tag. Have you found any workarround on the error ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "henriquemeca (via GitHub)" <gi...@apache.org>.
henriquemeca commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2654915529

   I'm having issues to fill all the PR requirements due to architecture incompatibilities.
   But if I may suggest a solution, a change in the `skywalking/plugins/__init__.py` file was enough to solve the issue locally.
   
   ```suggest
           if sys.version_info < (3, 12):
               plugin = importer.find_module(modname).load_module(modname)
           else: 
               plugin = importlib.util.module_from_spec(importer.find_spec(modname))
   ```
   
   Does it make sense to continue with it ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2656430402

   > Done [@kezhenxu94](https://github.com/kezhenxu94) [apache/skywalking-python#366](https://github.com/apache/skywalking-python/pull/366)
   
   thanks, will take a look soon


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Python] Outdated python lib used on agent startup [skywalking]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on issue #13030:
URL: https://github.com/apache/skywalking/issues/13030#issuecomment-2655755601

   > I'm having issues to fill all the PR requirements due to architecture incompatibilities. But if I may suggest a solution, a change in the `skywalking/plugins/__init__.py` file was enough to solve the issue locally.
   > 
   > ```
   >         if sys.version_info < (3, 12):
   >             plugin = importer.find_module(modname).load_module(modname)
   >         else: 
   >             plugin = importlib.util.module_from_spec(importer.find_spec(modname))
   > ```
   > 
   > Does it make sense to continue with it ?
   
   Thanks for the detail. Yes can you please file a pull request with the change?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org