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

Projects
None yet
2 participants
@fnielsen

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

This comment has been minimized.

Member

jeremygray commented Dec 13, 2015

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

BF: give error msg if bad permissions on userPrefsDir; closes psychop…
…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 added a commit to peircej/psychopy that referenced this issue Dec 16, 2015

@fnielsen

This comment has been minimized.

fnielsen commented Dec 16, 2015

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

This comment has been minimized.

fnielsen commented Dec 16, 2015

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

This comment has been minimized.

Member

jeremygray commented Dec 16, 2015

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

This comment has been minimized.

fnielsen commented Dec 16, 2015

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