Legacy singbox protobuf gencode prevents further loading
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 42/100
Piste de recherche
Reproduisez l’échec d’importation dans un conteneur python:3.13.2-alpine3.21 utilisant protobuf-5.28.3 sans descripteurs C. Commencez par xtlsapi/init.py, singbox_api/stats_pb2.py et singbox_api/extensions_pb2.py indiqués dans la traceback. C’est terminé lorsque l’importation de XrayClient réussit dans cet environnement et que l’API singbox reste disponible.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
Hi team hiddify,
It's an awesome xtlsapi you created. It works well on windows, but there were issues when I tried to deploy it on docker. I encountered the following problem in python:alpine container, causing the container to fail to start:
>>> from xtlsapi import XrayClient
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
from xtlsapi import XrayClient
File "/usr/local/lib/python3.13/site-packages/xtlsapi/__init__.py", line 2, in <module>
from xtlsapi.client.SingboxClient import SingboxClient
File "/usr/local/lib/python3.13/site-packages/xtlsapi/client/SingboxClient.py", line 3, in <module>
from xtlsapi.singbox_api_services import APIService
File "/usr/local/lib/python3.13/site-packages/xtlsapi/singbox_api_services/__init__.py", line 1, in <module>
from .stats import StatsAPIService
File "/usr/local/lib/python3.13/site-packages/xtlsapi/singbox_api_services/stats/__init__.py", line 1, in <module>
from .get_client_upload_traffic import GetClientUploadTraffic
File "/usr/local/lib/python3.13/site-packages/xtlsapi/singbox_api_services/stats/get_client_upload_traffic.py", line 2, in <module>
from xtlsapi.singbox_api import stats_pb2
File "/usr/local/lib/python3.13/site-packages/xtlsapi/singbox_api/stats_pb2.py", line 14, in <module>
from . import extensions_pb2 as extensions__pb2
File "/usr/local/lib/python3.13/site-packages/xtlsapi/singbox_api/extensions_pb2.py", line 22, in <module>
google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(message_opt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'MessageOptions' has no attribute 'RegisterExtension'
This seems to be related to https://github.com/mlflow/mlflow/issues/11811. Legacy singbox protobuf gencode prevents further loading when using protobuf without C descriptors, even if not singbox module is imported.
To Reproduce
It's easy to reproduce:
docker run -it python:alpine /bin/sh
pip install xtlsapi
from xtlsapi import XrayClient
Expected behavior
Upgrade singbox protobuf gencode, or lazy import singbox part.
Desktop (please complete the following information):
- docker image python:3.13.2-alpine3.21
- OS: Alpine Linux 3.21
- Python 3.13.2
- using protobuf without C descriptors, like protobuf-5.28.3-py3-none-any.whl
- Langage dominant
- Python
- Étoiles
- 64
- Forks
- 20
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de hiddify/xtlsapi
-
It won't let me add the fork.Ouvertebug help wanted
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
-
bug help wanted
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
-
Request from the hiddify teamOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
-
add/remove inbound/outbound apiOuverteenhancement question
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Toutes les issues de hiddify/xtlsapi
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Install the skills as a Claude Code pluginPeut-être pris @ruban-24 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 6 jours
-
Make the usage of time-zone aware UTC timestamps the norm across the pynxtools NOMAD ecosystemOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
FAIRmat-NFDI/pynxtools#874 ·
-
Eval: PublicationOuvertedata
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100