prometheus / prometheus/client_python
Error: TypeError: expected str, bytes or os.PathLike object, not NoneType
Aperta
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4.4k
- Fork
- 876
- Merge medio
- 8g 4h
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in django_q/cluster.py intorno alle righe 233-234 e segui la chiamata fino a prometheus_client.multiprocess.mark_process_dead. Riproduci il malfunzionamento e verifica perché il percorso passato a os.path.join è None. Il lavoro è completato quando la causa è confermata e lo scenario che fallisce ha un comportamento definito e verificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- django, prometheus, python
- Ambito
- observability
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100