chrisspen/django-chroniker

Have some troubles in Windows on cron launch

lbyakov opened this issue · 1 comments

(myenv) C:\Users\l.a.byakov\PycharmProjects\admin_prod>python manage.py cron --s
ettings=tcbadmin.settings_prod
System check identified some issues:

WARNINGS:
tcb.Agent.created: (fields.W161) Fixed default value provided.
        HINT: It seems you set a fixed date / time / datetime value as default f
or this field. This may not be what you want. If you want to have the current da
te as default, use `django.utils.timezone.now`
1 total stale jobs.
Checking stale job 1: 1 - Update Training status - running
Process with PID None is not elligible for killing.
b'Running job 1 1 - Update Training status - due.'
Traceback (most recent call last):
  File "manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\django\core\managemen
t\__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\django\core\managemen
t\__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\django\core\managemen
t\base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\django\core\managemen
t\base.py", line 345, in execute
    output = self.handle(*args, **options)
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\chroniker\management\
commands\cron.py", line 363, in handle
    sync=options['sync'],
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\chroniker\management\
commands\cron.py", line 216, in run_cron
    proc.start()
  File "D:\PythonProjects\TCBAdmin\myenv\lib\site-packages\chroniker\utils.py",
line 403, in start
    super(TimedProcess, self).start(*args, **kwargs)
  File "D:\Python35\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "D:\Python35\lib\multiprocessing\context.py", line 212, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "D:\Python35\lib\multiprocessing\context.py", line 313, in _Popen
    return Popen(process_obj)
  File "D:\Python35\lib\multiprocessing\popen_spawn_win32.py", line 66, in __ini
t__
    reduction.dump(process_obj, to_child)
  File "D:\Python35\lib\multiprocessing\reduction.py", line 59, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot serialize '_io.TextIOWrapper' object

(myenv) C:\Users\l.a.byakov\PycharmProjects\admin_prod>Traceback (most recent ca
ll last):
  File "<string>", line 1, in <module>
  File "D:\Python35\lib\multiprocessing\spawn.py", line 100, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "D:\Python35\lib\multiprocessing\reduction.py", line 86, in steal_handle
    _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Отказано в доступе

Can you help me with such kind of error?
I tried the same thing on mac and linux but everything is ok. I blame Windows. Hope you can help me. thanks.

Sorry, Windows isn't supported, and I don't have a Windows system to even test that. However, that "Access denied" error in Russian would lead me to believe your user doesn't have access to whatever Windows method is used to launch processes.