Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: TypeError: expected str, bytes or os.PathLike object, not NoneType #1061

Open
paulocoutinhox opened this issue Oct 10, 2024 · 0 comments

Comments

@paulocoutinhox
Copy link

Sometimes i get this error:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/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/[email protected]/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/[email protected]/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:

https://github.com/django-q2/django-q2/blob/337a5782d9113a6e9d058743488e7517aebb8280/django_q/cluster.py#L233-L234

When mark_process_dead is called.

Can you help me?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant