You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when I run python manage.py carrot to try and debug django-carrot on a Windows 10 Pro machine with Django 3.1, I get the following error:
Traceback (most recent call last):
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_common.py", line 446, in wrapper
ret = self._cache[fun]
AttributeError: _cache
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
return fun(self, *args, **kwargs)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_common.py", line 449, in wrapper
return fun(self)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_pswindows.py", line 766, in exe
exe = cext.proc_exe(self.pid)
PermissionError: [WinError 24] The program issued a command but the command length is incorrect: '(originated from NtQuerySystemInformation)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\carrot\management\commands\carrot.py", line 108, in handle
if 'python' in q.name():
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\__init__.py", line 615, in name
name = self._proc.name()
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_pswindows.py", line 750, in name
return os.path.basename(self.exe())
File "C:\Users\perkl\.virtualenvs\blmh-L0_mRpJz\lib\site-packages\psutil\_pswindows.py", line 681, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.AccessDenied: psutil.AccessDenied (pid=2340)
If I change the \management\commands\carrot.py to the following, then it solves the problem.
try:
if 'python' in q.name():
if len(q.cmdline()) > 1 and 'manage.py' in q.cmdline()[1] and 'carrot' in q.cmdline()[2]:
if os.name == 'nt':
if not q._pid == os.getpid():
running_pids.append(q._pid)
else:
if not q._pid == os.getpgid(0):
running_pids.append(q._pid)
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
pass
This was just a quick fix and not sure if it is the best way, but thought I would point it out. My addition was the try except part.
The text was updated successfully, but these errors were encountered:
So when I run python manage.py carrot to try and debug django-carrot on a Windows 10 Pro machine with Django 3.1, I get the following error:
If I change the \management\commands\carrot.py to the following, then it solves the problem.
This was just a quick fix and not sure if it is the best way, but thought I would point it out. My addition was the try except part.
The text was updated successfully, but these errors were encountered: