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

traceback error after attempting chmod +x executable #46

Closed
JuFisch opened this issue Aug 14, 2015 · 1 comment
Closed

traceback error after attempting chmod +x executable #46

JuFisch opened this issue Aug 14, 2015 · 1 comment

Comments

@JuFisch
Copy link

JuFisch commented Aug 14, 2015

Couldn't run './learntris.py' due to a permission error.
Make sure your program is marked as an executable.
localhost:learntris Julie1_macbook_pro$ chmod +x learntris.py
localhost:learntris Julie1_macbook_pro$ ./testris.py ./learntris.py
--------------------------------------------------
Traceback (most recent call last):
  File "./testris.py", line 165, in main
    run_tests(cmdline, use_shell)
  File "./testris.py", line 131, in run_tests
    program = spawn(program_args, use_shell)
  File "./testris.py", line 81, in spawn
    stdout=subprocess.PIPE)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
--------------------------------------------------
Oh no! Testris encountered an unexpected problem while
attempting to run your program. Please report the above
traceback in the issue tracker, so that we can help you
with the problem and provide a better error message in
the future.
@raylu
Copy link
Contributor

raylu commented Aug 14, 2015

Your file is executable but your OS doesn't know how to run that executable. You should get an error (though a different one) if you try to run just ./learntris.py. The problem is almost certainly that you need to add a shebang to the start of the file:

#!/usr/bin/env python

@darkf darkf closed this as completed Aug 18, 2016
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