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

Syncplay fails with "Unhandled Error" and stacktrace #352

Closed
gnull opened this issue Sep 13, 2020 · 5 comments
Closed

Syncplay fails with "Unhandled Error" and stacktrace #352

gnull opened this issue Sep 13, 2020 · 5 comments

Comments

@gnull
Copy link

gnull commented Sep 13, 2020

Syncplay fails on my Archlinux machine with the following error. I see the error with both VLC and MPV. Is there anything I can do to fix it?

Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
[12:52:05] Attempting to connect to syncplay.pl:8999
[12:52:05] This client does not support TLS
[12:52:05] Successfully reached syncplay.pl (151.80.32.178)
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/twisted/python/log.py", line 103, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python3.8/site-packages/twisted/python/log.py", line 86, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python3.8/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3.8/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python3.8/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python3.8/site-packages/twisted/internet/tcp.py", line 243, in doRead
    return self._dataReceived(data)
  File "/usr/lib/python3.8/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/lib/python3.8/site-packages/twisted/internet/endpoints.py", line 132, in dataReceived
    return self._wrappedProtocol.dataReceived(data)
  File "/usr/lib/python3.8/site-packages/twisted/protocols/basic.py", line 572, in dataReceived
    why = self.lineReceived(line)
  File "/usr/lib/syncplay/syncplay/protocols.py", line 55, in lineReceived
    self.handleMessages(messages)
  File "/usr/lib/syncplay/syncplay/protocols.py", line 26, in handleMessages
    self.handleSet(message[1])
  File "/usr/lib/syncplay/syncplay/protocols.py", line 195, in handleSet
    self._client.playlist.changeToPlaylistIndex(values['index'], user, resetPosition=resetPosition)
  File "/usr/lib/syncplay/syncplay/client.py", line 1723, in changeToPlaylistIndex
    if self.loadDelayedPath(index):
  File "/usr/lib/syncplay/syncplay/client.py", line 1698, in loadDelayedPath
    self._client.openFile(delayedLoadPath, resetPosition=True, fromUser=True)
  File "/usr/lib/syncplay/syncplay/client.py", line 564, in openFile
    self._player.openFile(filePath, resetPosition)
builtins.AttributeError: 'NoneType' object has no attribute 'openFile'

[12:52:05] Connection with server lost, attempting to reconnect
[12:52:05] This client does not support TLS

Hello username,

The Syncplay latest is available from http://syncplay.pl/


[12:52:05] Successfully connected to server
[12:52:08] Connection with server lost, attempting to reconnect

I ran it with the command

syncplay --player-path /bin/vlc -r room -a syncplay.pl:8999 -n username file.mpv
@Et0h
Copy link
Contributor

Et0h commented Sep 13, 2020

Sounds like it might be a PySide issue. You might find some useful information in #321, #341 and #335. Does it work when you run Syncplay with --no-gui?

@gnull
Copy link
Author

gnull commented Sep 13, 2020

I still see the same error with --no-gui.

But I seem to have found a workaround: I run syncplay --player-path /bin/vlc -r room -a syncplay.pl:8999 -n username without specifying a video file to play, then manually do File→Open in VLC, this way it opens the file and plays it synchronized with other clients with no errors.

Thank you for the references, I will check them out.

@Et0h
Copy link
Contributor

Et0h commented Sep 13, 2020

@gnull Please try adding the following to the top of def loadDelayedPath(self, changeToIndex): just below # Implementing the behaviour set out at https://github.com/Syncplay/syncplay/issues/315 in client.py and let me know if it fixes it for loading with a path specified:

        if self._client.playerIsNotReady():
            self._client.addPlayerReadyCallback(lambda x: self.loadDelayedPath(changeToIndex))
            return

@gnull
Copy link
Author

gnull commented Sep 13, 2020

@Et0h With the lines you provided it works perfectly. Thanks a lot!

@Et0h
Copy link
Contributor

Et0h commented Sep 13, 2020

Great, I've pushed the fix to the main repo now.

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