and3rson / clay

Awesome standalone command line player for Google Play Music.
GNU General Public License v3.0
157 stars 11 forks source link

Windows Can't Launch Clay #35

Open SilasReinagel opened 5 years ago

SilasReinagel commented 5 years ago

Error message:

Traceback (most recent call last):
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\Scripts\clay-script.py", line 11, in <module>
    load_entry_point('clay-player==1.1.0', 'console_scripts', 'clay')()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
    return self.resolve()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\app.py", line 16, in <module>
    from clay.player import player
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\player.py", line 16, in <module>
    from clay import vlc, meta
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\vlc.py", line 199, in <module>
    dll, plugin_path  = find_lib()
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\vlc.py", line 174, in find_lib
    dll = ctypes.CDLL(libname)
  File "c:\program files\python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
ValentijnvdBeek commented 5 years ago

Hi Silas, thanks for the bug report.

It looks like it can't find the libvlc library on your system, could you double check whether it is installed? By the way, are you running it on native Windows or on the Linux Subsystem for Windows (which I would recommend)?

As far as I know neither me or @and3rson run Windows as our primary operating system so it is defacto a secondary citizen. If somebody is able to pick up that torch or, at least, regularly test it and report any bugs that they find than that would be really awesome.

Anyways, I'll look into this at some point today or tomorrow.

SilasReinagel commented 5 years ago

@ValentijnvdBeek Aha. That helped me get one step closer.

For context, I am not using the Linux Subsystem for Windows.

Apparently installing VLC is a prerequisite for using Clay, and is not automatically installed with Clay. That got me past the previous error.

Now I have a new error message

Traceback (most recent call last):
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\Scripts\clay-script.py", line 11, in <module>
    load_entry_point('clay-player==1.1.0', 'console_scripts', 'clay')()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
    return self.resolve()
  File "c:\program files\python36\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\app.py", line 16, in <module>
    from clay.player import player
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\player.py", line 16, in <module>
    from clay import vlc, meta
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\vlc.py", line 199, in <module>
    dll, plugin_path  = find_lib()
  File "C:\Users\sreinag\AppData\Roaming\Python\Python36\site-packages\clay\vlc.py", line 177, in find_lib
    dll = ctypes.CDLL(p)
  File "c:\program files\python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

StackOverflow seems to indicate that this might be an issue with the way the process is being launched. https://stackoverflow.com/questions/25651990/oserror-winerror-193-1-is-not-a-valid-win32-application

and3rson commented 5 years ago

@SilasReinagel Thank you for the report. Can you validate that your VLC matches the architecture of your Python installation? (32/64)

I'll try to run clay in VM and reproduce it tomorrow.

and3rson commented 5 years ago

@SilasReinagel I could not reproduce this, but Windows is not supported by urwid lib that we use for TUI so that's another blocker. I maintain urwid and we currently have Windows support on the roadmap, but it won't be coming very soon... Thus Clay will not support Windows anytime soon either. :(

ValentijnvdBeek commented 5 years ago

@and3rson Does it work in the Windows Subsystem for Linux? That might be a better way to support Windows system since it would decrease the maintenance workload on Clay.

Personally I feel like it would be a decent trade off since we are not targeting the average user but rather a more advanced level subsystem that prefer commandline[1] applications over GUI applications.

[1] In spite of Clay requiring xorg, Qt, and (in the past) GTK+

ValentijnvdBeek commented 5 years ago

@SilasReinagel @and3rson I just switched the bug for the wontfix tag since it seems to me like this is expected behaviour and that there isn't a lot we can do about it until urwid adds Windows support. I also changed the name to indicate that it applies to all versions of Windows.

Do you both agree with this?

SilasReinagel commented 5 years ago

@ValentijnvdBeek That’s unfortunate, but acceptable. Perhaps I will experiment with the Windows Subsystem in the near future.