Better import error message #206
Comments
I agree with you that importing and relative errors should be revised to pinpoint the actual package that is missing. The reason why that particular message is hardcoded is to allow the user to run Syncplay from the command line if some modules needed for the GUI are missing. As soon as I have time, I will try to give a look at the current import system for critical modules and create correct error messages.
Personally, I disagree with this solution. First of all, Syncplay is not a Python module but a stand-alone application, and AFAIK pip is not supposed to be used for this kind of projects. Also, pip is a tool closely related to Python development, and not many users are aware of it and of how to use it to install their software. An alternative solution will be to provide some other kind of application package for Linux, as discussed in #199. Unfortunately, my latest comment did not receive any answer from Linux users. I encourage you to comment in that issue and provide your feedback there. |
Side note: you can also install PySide 1.x on Bionic and Python 3.6 with the |
There's precedent for using pip to install "apps", eg https://github.com/nvbn/thefuck. Also setup.py provides a mechanism for registering python scripts as executables. I'd make the argument that, since syncplay doesn't install required packages automatically, I'm not saying that a |
We had a similar discussion within the team during the introduction of PySide2. When I raised that very same argument, the general consensus was that Linux users install dependencies mainly through packages, and not using |
For the moment, I am fixing only the error message that shows if Twisted is missing. We will address the PySide error message as soon as PySide2 packages are commonly available for Linux. Thanks for reporting this. |
When running syncplay, I got
Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
I think this is misleading for a few reasons:
IMO, the error message shouldn't be hardcoded to tell the user to install a particular library for these reasons. A possible enhancement would be to bundle syncplay as a pip package, so said requirements can be automatically installed. (Plus, you could then just do
pip install syncplay
to install on all platforms)The text was updated successfully, but these errors were encountered: