prometheus / prometheus/client_python
Error: TypeError: expected str, bytes or os.PathLike object, not NoneType
Abierto
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 4.4k
- Forks
- 876
- Merge medio
- 8 d 4 h
- PR fusionados (30 d)
- 1
Descripción
Sometimes i get this error:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/django_q/cluster.py", line 165, in __init__
self.start()
File "/opt/homebrew/lib/python3.10/site-packages/django_q/cluster.py", line 174, in start
self.guard()
File "/opt/homebrew/lib/python3.10/site-packages/django_q/cluster.py", line 315, in guard
self.reincarnate(p)
File "/opt/homebrew/lib/python3.10/site-packages/django_q/cluster.py", line 234, in reincarnate
prometheus_multiprocess.mark_process_dead(process.pid)
File "/opt/homebrew/lib/python3.10/site-packages/prometheus_client/multiprocess.py", line 169, in mark_process_dead
for f in glob.glob(os.path.join(path, f'gauge_{mode}_{pid}.db')):
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
It happen here:
When mark_process_dead is called.
Can you help me?
Thanks.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en django_q/cluster.py, alrededor de las líneas 233-234, y sigue la llamada hasta prometheus_client.multiprocess.mark_process_dead. Reproduce el fallo e inspecciona por qué la ruta pasada a os.path.join es None. Se considera terminado cuando la causa está confirmada y el escenario que falla tiene un comportamiento definido y verificado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- django, prometheus, python
- Área
- observability
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100