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

psychopyApp.py exits with no error message after startup when .psychopy2 directory is not owned by user #1055

Closed
fnielsen opened this issue Dec 3, 2015 · 5 comments

Comments

@fnielsen
Copy link

fnielsen commented Dec 3, 2015

Starting psychopyApp.py it immediately exits with no error message. The problem seem to be the permission on the ~/.psychopy2 directory. Installation with root on Ubuntu makes it owned by root. When changing the owner and group of the directory psychopyApp.py starts up.

psychopyApp should have a better error message in this case.

This was for the present pip version.

@jeremygray
Copy link
Contributor

I agree there should be a better error message, should be easy to add although might not be easy to get that error message back out to the user if the app exits immediately.

Just trying to understand what happened in your case: Did "installation as root" really create the ~/.psychopy2 directory? Here ~ should be root, yes? And if ~ is not root, I'm surprised that it knows which regular user is intended when installing as root.

jeremygray added a commit to jeremygray/psychopy that referenced this issue Dec 13, 2015
…y#1055

This helps avoid one kind of silent failure to start up.
The usual advice (to remove the userPrefsDir) should indeed
fix this situation, but its nicer to get an error message.
peircej pushed a commit to peircej/psychopy that referenced this issue Dec 16, 2015
@fnielsen
Copy link
Author

Regarding your question 'Did "installation as root" really create the ~/.psychopy2 directory?' Apparently yes:

$ mv .psychopy2/ ~/tmp/.psychopy2
$ sudo pip uninstall psychopy
$ sudo pip install psychopy==1.82.1
$ ls -tral .psychopy2/
total 16
drwxr-xr-x 142 fnielsen fnielsen 12288 Dec 16 13:34 ..
drwxr-xr-x   2 root     root      4096 Dec 16 13:34 .

This is also an issue with PsychoPy-1.82.01.tar.gz

@fnielsen
Copy link
Author

Should I make a new issue on the permission issue? As far as I see 300175b changes to a more informative error message, - not the installation issue.

@jeremygray
Copy link
Contributor

Yes, please open a new issue and link to this one. Your shell output is useful. The bug is related to the fact that os.path.expanduser('~') is always the regular user, not root when using sudo. Should be easy to fix.

@fnielsen
Copy link
Author

Thanks! As noted above I have created a new issue #1073

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