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

Your CLI app might work on Windows #408

Open
jquast opened this issue Feb 2, 2020 · 5 comments
Open

Your CLI app might work on Windows #408

jquast opened this issue Feb 2, 2020 · 5 comments

Comments

@jquast
Copy link

jquast commented Feb 2, 2020

If you just update blessed, it may support Windows, at least the blessed library now does.

Best wishes,

jq

@Koed00
Copy link
Owner

Koed00 commented Feb 19, 2020

There is no limit on which version of blessed you can run.
The requirements.txt is only used to install dependecies for the tests, it doesn't affect your pip install.
Since I don't really have a windows environment it is hard for me to test this, but let me know if you can get it to work.

@jquast
Copy link
Author

jquast commented Mar 2, 2020

I think it is just some (small?) problem in the "self.sentinel" process starting, a threaded lock object fails to serialize for the child process, which makes perfect sense, but i can't trace what this lock object is so far, I've studied much and it isn't obvious, perhaps some IDE and breakpoints on WIndows will help identify it.

If this doesn't open a can of worms, maybe I can fix it for you

(ENV38) C:\Users\blessed\django-proj\locallibrary>python manage.py qcluster
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\blessed\ENV38\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "C:\Users\blessed\ENV38\lib\site-packages\django\core\management\__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\blessed\ENV38\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\blessed\ENV38\lib\site-packages\django\core\management\base.py", line 369, in execute
    output = self.handle(*args, **options)
  File "C:\Users\blessed\ENV38\lib\site-packages\django_q\management\commands\qcluster.py", line 22, in handle
    q.start()
  File "C:\Users\blessed\ENV38\lib\site-packages\django_q\cluster.py", line 65, in start
    self.sentinel.start()
  File "C:\Python38\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Python38\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Python38\lib\multiprocessing\context.py", line 326, in _Popen
    return Popen(process_obj)
  File "C:\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Python38\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_thread.lock' object

(ENV38) C:\Users\blessed\django-proj\locallibrary>Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python38\lib\multiprocessing\spawn.py", line 102, in spawn_main
    source_process = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect

@Koed00
Copy link
Owner

Koed00 commented Mar 3, 2020

Interestingly some users on MacOS have been seeing the same error #389

@Koed00
Copy link
Owner

Koed00 commented Mar 3, 2020

https://bugs.python.org/issue29168 might be related

@Koed00
Copy link
Owner

Koed00 commented Mar 16, 2020

Moving thread lock issues to #424

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

2 participants