Skip to content

Windoc modify #521

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

Merged
merged 1 commit into from
Aug 15, 2017
Merged

Conversation

kapilkd13
Copy link
Contributor

modifying installation instructions on windows and adding a solution to a problem that user may encounter

windowsdoc.md Outdated
random API (CryptoGen)` then try setting `SYSTEMROOT` environment variable to
windows directory location (usually at `C:\\WINDOWS`). The reason behind this error
is that when a python instance is created from current instance, it needs `SYSTEMROOT`
env variable to starts its random generator on Windows OS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug with Python, Virtualenv, or us? Do you have any external references for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to be a problem with python itself. I encountered this problem when working on py3 for windows and related issue is here http://bugs.python.org/issue20614

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I find these instructions confusing. Isn't SYSTEMROOT already set? Is this the responsibility of the user to check and fix, or a developer looking to (re)use the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my system SYSTEMROOT was not set by default (also checked on one other Windows system). Actually this problem is not related to cwltool, but since our test_examples unit test https://github.com/common-workflow-language/cwltool/blob/master/tests/test_examples.py#L123 creates a python cmdline instruction as job and this error occured during unit testing, I decided to add this information.
A better wording can be used, what do you suggest. 😄

windowsdoc.md Outdated
### Fatal error occurs when executing a python command Line instruction as a job on python version 3.

If your workflow creates a python command line instruction (like we do in this
[unit test](https://github.com/common-workflow-language/cwltool/blob/master/tests/test_examples.py#L117) ) and you get a error `Fatal Python error: Failed to initialize Windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line wrap at 80 columns please. Also, I do not see any workflow calling python at the given link

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we run test_examples.test_partial_scatter, a python command line instruction is generated as below. Here I got this error.

Resolved 'E:\GitHub\gsoc\cwltool\tests\..\tests\wf\scatterfail.cwl' to 'file:///E:/GitHub/gsoc/cwltool/tests/wf/scatterfail.cwl'
[workflow scatterfail.cwl] start
[step step1] start
[workflow step1] start
[step sstep1] start
[jobee sstep1] c:\users\kapilk~1\appdata\local\temp\tmpxnohco$ python \
    -c \
    'from __future__ import print_function
import sys
print(sys.argv[1])
if sys.argv[1] == "2":
  exit(1)
else:
  f = open("foo"+sys.argv[1]+".txt", "wb")
  content = sys.argv[1]+"\n"
  f.write(content.encode('"'"'utf-8'"'"'))
if sys.argv[1] == "5":
  exit(1)
' \
    1
1
after
[jolb sstep1] completed success
[step sstep1] completed success
[step sstep2] start
[jobee sstep2] c:\users\kapilk~1\appdata\local\temp\tmp0rjlug$ cat \
    /C/users/kapilk~1/appdata/local/temp/tmpnzk_wf/stgae130961-a089-4793-b067-019a7abdd6b3/foo1.txt
cat: /C/users/kapilk~1/appdata/local/temp/tmpnzk_wf/stgae130961-a089-4793-b067-019a7abdd6b3/foo1.txt: No such file or directory
after
[joboo sstep2] completed permanentFail
[step sstep2] completed permanentFail
[workflow step1] completed permanentFail
[step step1] start
[workflow step1_2] start
[step sstep1_2] start
[jobee sstep1_2] c:\users\kapilk~1\appdata\local\temp\tmp32cq41$ python \
    -c \
    'from __future__ import print_function
import sys
print(sys.argv[1])
if sys.argv[1] == "2":
  exit(1)
else:
  f = open("foo"+sys.argv[1]+".txt", "wb")
  content = sys.argv[1]+"\n"
  f.write(content.encode('"'"'utf-8'"'"'))
if sys.argv[1] == "5":
  exit(1)
' \
    2
2
[job sstep1_2] Job error:
E:GitHub\gsoc\cwltool\tests\wf\echo.cwl:20:3: Error collecting output for parameter 'out':
E:GitHub\gsoc\cwltool	ests\wf\echo.cwl:23:7:   Did not find output file with glob pattern: '['foo2.txt']'
[joboo sstep1_2] completed permanentFail
[step sstep1_2] Output is missing expected field file:///E:/GitHub/gsoc/cwltool/tests/wf/scatterfail.cwl#step1/subtool/sstep1/out
[step sstep1_2] completed permanentFail
[workflow step1_2] completed permanentFail
[step step1] start
[workflow step1_3] start
[step sstep1_3] start
[jobee sstep1_3] c:\users\kapilk~1\appdata\local\temp\tmpdwpn_3$ python \
    -c \
    'from __future__ import print_function
import sys
print(sys.argv[1])
if sys.argv[1] == "2":
  exit(1)
else:
  f = open("foo"+sys.argv[1]+".txt", "wb")
  content = sys.argv[1]+"\n"
  f.write(content.encode('"'"'utf-8'"'"'))
if sys.argv[1] == "5":
  exit(1)
' \
    3
3
after
[jolb sstep1_3] completed success
[step sstep1_3] completed success
[step sstep2_3] start
[jobee sstep2_2] c:\users\kapilk~1\appdata\local\temp\tmpzly48y$ cat \
    /C/users/kapilk~1/appdata/local/temp/tmpswvggv/stg906b6972-c95c-4bf0-9029-0f877f8bfe8e/foo3.txt
cat: /C/users/kapilk~1/appdata/local/temp/tmpswvggv/stg906b6972-c95c-4bf0-9029-0f877f8bfe8e/foo3.txt: No such file or directory
after
[joboo sstep2_2] completed permanentFail
[step sstep2_3] completed permanentFail
[workflow step1_3] completed permanentFail
[step step1] completed permanentFail
[workflow scatterfail.cwl] completed permanentFail


========================== 1 passed in 10.48 seconds ==========================

Process finished with exit code 0

Sorry about the line wrap. I will fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that's a bug with cwltool under windows -- we should find a way to fix that without user intervention.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per d8d9b66 this commit will be removed/reverted

@kapilkd13
Copy link
Contributor Author

@mr-c I think we can merge this PR

@mr-c mr-c merged commit 4c68e87 into common-workflow-language:master Aug 15, 2017
@mr-c
Copy link
Member

mr-c commented Aug 15, 2017

@kapilkd13 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

Successfully merging this pull request may close these issues.

2 participants