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

Tries to run /Application/VLC.app #91

Closed
edanluna opened this issue Dec 29, 2015 · 4 comments
Closed

Tries to run /Application/VLC.app #91

edanluna opened this issue Dec 29, 2015 · 4 comments

Comments

@edanluna
Copy link

I follow the instructions to install syncplay.
With mpv I can see the movie but with VLC y get:

 File "/Users/eald/syncplay/syncplay/players/vlc.py", line 205, in run
    vlc = VlcPlayer(client, VlcPlayer.getExpandedPath(playerPath), filePath, args)
  File "/Users/eald/syncplay/syncplay/players/vlc.py", line 55, in __init__
    self._listener = self.__Listener(self, playerPath, filePath, args, self._vlcready, self._vlcclosed)
  File "/Users/eald/syncplay/syncplay/players/vlc.py", line 317, in __init__
    self.__process = subprocess.Popen(call, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/Users/eald/miniconda2/envs/syncplay/lib/python2.7/subprocess.py", line 710, in __init__
   errread, errwrite)
  File "/Users/eald/miniconda2/envs/syncplay/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
exceptions.OSError: [Errno 13] Permission denied

After some exploration syncplay tries to run /Application/VLC.app which is the text that is show by default in the UI. I assume it is related.

I don't know the reason for this to happen or if you don't consider a problem but when I go back and select the complete path of VLC it works. I'm not used to how mac works but I would assume that some people will find the error and it is just an UI issue, to make it clear that you have to select the full path of the binary or to deduce the path of the binary.

@Et0h
Copy link
Contributor

Et0h commented Dec 30, 2015

I don't use OS X. If /Applications/VLC.app/Contents/MacOS/VLC is the wrong path then what is the 'complete path of VLC' that you reckon Syncplay should be suggesting?

@edanluna
Copy link
Author

My bad, that is not the issue. The issue is that Syncplay chooses /Applications/VLC.app/ (at least in my computer) when I select VLC in the Open Dialog as the full path for VLC, instead of /Applications/VLC.app/Contents/MacOS/VLC.

When I click in the arrow right to the textbox THEN I see the full path as an option.

Steps to reproduce:

  1. Open Syncplay
  2. Click Browse to search for a player
  3. Click open
  4. Path to player media player textbox has: /Applications/VLC.app as content
  5. Syncplay tries to use the folder as the player and fails.

Expected behavior:
Either:

  • Warning that you need to click on the dropdown to really select a file not a folder
  • Make the Open dialog so you can select the real file that can be run by syncplay
  • From /Applications/VLC.app in the textbox deduce the rest of the path and either:
    • Put that text for default in the textbox
    • Do it when you are about to create the player instance in Syncplay client and make a substitution that the users doesn't see.

All in all is just an UI/Usability issue.

As a python newbie what happened to me is that I saw the error in the terminal first, then I saw that mpv didn't have that problem at all. So went and compared the code of both classes in the Syncplay code until I figured out that both players VLC and mpv have the same code for expanding the path so it couldn't be something that the player Factory or anything like that could be doing (I avoid UI code as much as I can) and decided to make this ticket and THEN I saw the drop down arrow where the full path of VLC was instead of the short one that have been plaguing me.

@Et0h
Copy link
Contributor

Et0h commented Dec 31, 2015

Thanks for bringing this issue to light. I've mentioned this problem at #81 so hopefully we'll find someone who will be able to code and test a fix for this. For people who use a Mac and know Python I'm guessing it won't be too hard to solve based on your suggested expected behaviour. If it is possible, just correcting the location as appropriate would be nicer than having to give a warning.

@Et0h Et0h closed this as completed in 9804ceb Jan 19, 2016
Et0h added a commit that referenced this issue Jan 19, 2016
set the correct player executable path when an .app was selected on OS X (fixes #91)
@Et0h
Copy link
Contributor

Et0h commented Jan 20, 2016

Hopefully nilsding's commit fixes this problem :)

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