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

problem sourcing setup.sh #561

Closed
hugomatic opened this issue Dec 13, 2013 · 3 comments
Closed

problem sourcing setup.sh #561

hugomatic opened this issue Dec 13, 2013 · 3 comments
Assignees
Labels

Comments

@hugomatic
Copy link

This is what I get with setup.sh:

ubuntu@ip-10-217-153-196:~/cloudsim$ . /opt/ros/groovy/setup.sh
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
-bash: [: 0: unary operator expected

And this is setup.bash:

ubuntu@ip-10-217-153-196:~/cloudsim$ . /opt/ros/groovy/setup.bash
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

@dirk-thomas
Copy link
Member

It looks like that the executed _setup_util.py script fails and later the shell script does not have the variables set it expects. But I need more information in order to figure out what the problem in your case is.

Can you please invoke the python script manually (in the same way as it is called by the setup.sh file) and post the result (hopefully an error message / stacktrace)?

@hugomatic
Copy link
Author

I did not expect setup.sh to create any temporary files. The setup.sh was probably failing because the disk got full.

@ghost ghost assigned dirk-thomas Dec 13, 2013
@dirk-thomas
Copy link
Member

That fits the above description perfectly. If the disk is full _setup_util.py fails to pipe the output to the temporary file. Python fails to signal the error before the script is already shutting down. which leads to the sys.excepthook is missing (http://bugs.python.org/issue11380).

The solution is:

  • actually check the return code of the _setup_util.py invocation
  • update _setup_util.py to explicitly flush stdout at the end as well as catch a broken pipe exception

dirk-thomas added a commit that referenced this issue Dec 14, 2013
add error handling when _setup_util.py fails, e.g. due to disk full (fix #561)
cwecht pushed a commit to cwecht/catkin that referenced this issue Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants