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

Current code running on windows reports multiple errors #54

Open
htung0101 opened this issue May 1, 2021 · 6 comments
Open

Current code running on windows reports multiple errors #54

htung0101 opened this issue May 1, 2021 · 6 comments
Assignees

Comments

@htung0101
Copy link

I am trying to generate data on the window machines, but I get several errors.
Can someone make sure that the code can run on winodws? Here are some of the errors:

  1. stopit is not working on window. @felixbinder

Traceback (most recent call last):
File "tdw_physics/target_controllers/dominoes.py", line 1759, in
args_dict=vars(args))
File "c:\cygwin64\home\hsiaoyut\2021\tdw_physics\tdw_physics\dataset.py", line 236, in run
with stopit.SignalTimeout(5) as to_ctx_mgr: #since TDW sometimes doesn't acknowledge being stopped we only try to close it
File "C:\cygwin64\home\hsiaoyut\anaconda\envs\tdw\lib\site-packages\stopit\utils.py", line 73, in enter
self.setup_interrupt()
File "C:\cygwin64\home\hsiaoyut\anaconda\envs\tdw\lib\site-packages\stopit\signalstop.py", line 33, in setup_interrupt
signal.signal(signal.SIGALRM, self.handle_timeout)
AttributeError: module 'signal' has no attribute 'SIGALRM'

  1. things that try to use subprocess run is not working (not sure if related to cygwin)
    File "c:\cygwin64\home\hsiaoyut\2021\tdw_physics\tdw_physics\dataset.py", line 545, in _write_static_data
    res = subprocess.run('git rev-parse HEAD', shell=True, capture_output=True, text=True)
    File "C:\cygwin64\home\hsiaoyut\anaconda\envs\tdw\lib\subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
    TypeError: init() got an unexpected keyword argument 'capture_output'

  2. related to 2, deleting png with subprocess is not working:

rm: cannot remove 'datadominoespilot_dominoes_1mid_J025R45_boxroompngs_0002/img_*.png': No such file or directory
ipdb> self.png_dir

  1. save movie also uses subprocess, and it is not working
    cmd, stdout, stderr = pngs_to_mp4(
    filename=mp4_filename,
    image_stem=pass_mask[1:]+'_',
    png_dir=self.png_dir,
    size=[self._height, self._width],
    overwrite=True,
    remove_pngs=True,
    use_parent_dir=False)
@felixbinder
Copy link

e768a97 Fixes your first issue—looks like Windows doesn't support ending processes with signals 🤬 You could try to replace stopit.SignalTimeout(5) with stopit.ThreadingTimeout(5) and see if that works. Now it'll hang on Windows again

@felixbinder
Copy link

Don't know about the second one—I think that has always been the case and we've been ignoring the pngs. Not sure about the movie

@htung0101 htung0101 reopened this May 1, 2021
@htung0101
Copy link
Author

@danielbear : Can you check 2, 3, 4? Can we assign someone to fix this in the master branch?
Basically to make sure the current thing can run on Windows.

@danielbear
Copy link

danielbear commented May 2, 2021 via email

@danielbear
Copy link

danielbear commented May 2, 2021 via email

@danielbear
Copy link

Any update on this? Are you still unable to render on Windows when you exclude the suprocess.run calls?

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

3 participants