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

Linux mentioned, but not possible to get working? #108

Open
spacelama opened this issue Nov 10, 2023 · 12 comments
Open

Linux mentioned, but not possible to get working? #108

spacelama opened this issue Nov 10, 2023 · 12 comments

Comments

@spacelama
Copy link

There's several mentions on Linux/ubuntu etc in eg README.md, but judging from requirements.txt, this is never going to work with the dependency on pywin32 and inherent dependencies on things such as mpv-2.dll. Looking at git log/git blame, it looks like linux has been an afterthought since well before 4420ee3 and maybe all the way back to v2.1.4 (which I couldn't get pip3 install -r requirements.txt to run anyway).

If it's no longer a consideration, maybe that should be clarified in README.md.

@dfaker
Copy link
Owner

dfaker commented Nov 10, 2023

The win32 module is only used for supporting long and network hosted files on Windows, and the import is skipped on other platforms.

And yes on Linux it's the .so version of the library not the .dll, support for either us handled by pythonmpv.

Looks like removing the win32 line from the requirements.txt should get it all installing for you. I'll see about adding in a Linux specific requirements.txt

@spacelama
Copy link
Author

spacelama commented Nov 10, 2023

OK, I had further problems when I tried that originally, but didn't realise most of the python stack dumps were from code paths that were try/excepted. Still unable to test probably because of my libmpv version (libmpv1) - I can't test that until I'm in a position to update my workstation from debian oldstable.
(install instructions for linux could probably do with a note to ensure apt install libmpv2 or equivalent if available)

@LeKite
Copy link

LeKite commented Jan 16, 2024

Is it still not possible to run this on Linux? I recently put Manjaro and I'd love to have this on it. I really like the tool.

@dfaker
Copy link
Owner

dfaker commented Mar 18, 2024

@LeKite I've added a requirements-linux.txt now skipping the win32 dependency, that along with libmpv2 should be all you need, give it a go and if you get any failures we'll see what additional guidance we need to add to a linux install note.

@LeKite
Copy link

LeKite commented Apr 11, 2024

Mmm im very stupid to know how to make it run though. An AUR package would be awesome

@broconut123
Copy link

broconut123 commented Jun 17, 2024

Haven't used this program in a while but I cloned it today and i'm unable to get it to work. Using arch linux.

`(webms) x@zxc ~/WebmGenerator (master)> python webmGenerator.py
Initial working directory /home/x/WebmGenerator
Current working directory /home/x/WebmGenerator
2024-06-17 21:32:50,196 [MainThread ] [INFO ] Startup.
/home/x/WebmGenerator/src
/home/x/WebmGenerator/webms/bin
module 'os' has no attribute 'add_dll_directory'
2024-06-17 21:32:50,210 [MainThread ] [ERROR] win32api getShortPathName Exception
Traceback (most recent call last):
File "/home/x/WebmGenerator/src/encodingUtils.py", line 26, in
import win32api
ModuleNotFoundError: No module named 'win32api'
/home/x/WebmGenerator/src
/home/x/WebmGenerator/webms/bin
module 'os' has no attribute 'add_dll_directory'
2024-06-17 21:32:50,301 [MainThread ] [INFO ] data registered as img_not_supported
No module named 'webrtcvad'
cleanInitialFiles {} []
2024-06-17 21:32:50,383 [MainThread ] [ERROR] Zoomed state not avaliable, possibly on some linux distros?
Traceback (most recent call last):
File "/home/x/WebmGenerator/src/webmGeneratorUi.py", line 224, in init
self.master.state('zoomed')
File "/usr/lib/python3.12/tkinter/init.py", line 2295, in wm_state
return self.tk.call('wm', 'state', self._w, newstate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bad argument "zoomed": must be normal, iconic, or withdrawn
Failed to load player bg image couldn't open ".\resources\playerbg.png": no such file or directory
2024-06-17 21:32:50,494 [MainThread ] [ERROR] Startup Exception
Traceback (most recent call last):
File "/home/x/WebmGenerator/webmGenerator.py", line 32, in
webmGenerator = WebmGeneratorController(initialFiles)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/src/webmGeneratorController.py", line 247, in init
self.cutselectionController = CutselectionController(self.cutselectionUi,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/src/cutselectionController.py", line 28, in init
self.initialisePlayer()
File "/home/x/WebmGenerator/src/cutselectionController.py", line 302, in initialisePlayer
self.player = mpv.MPV(wid=str(int(playerFrameWid)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 861, in init
mpv_set_option_string(self.handle, k.replace('', '-').encode('utf-8'), istr(v).encode('utf-8'))
File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 142, in raise_for_ec
raise ex
ValueError: ('Invalid value for mpv option', -7, (<MpvHandle object at 0x788630b17e50>, b'background', b'#282828'))
2024-06-17 21:32:50,496 [MainThread ] [ERROR] Traceback (most recent call last):
File "/home/x/WebmGenerator/webmGenerator.py", line 32, in
webmGenerator = WebmGeneratorController(initialFiles)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/src/webmGeneratorController.py", line 247, in init
self.cutselectionController = CutselectionController(self.cutselectionUi,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/src/cutselectionController.py", line 28, in init
self.initialisePlayer()
File "/home/x/WebmGenerator/src/cutselectionController.py", line 302, in initialisePlayer
self.player = mpv.MPV(wid=str(int(playerFrameWid)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 861, in init
mpv_set_option_string(self.handle, k.replace('', '-').encode('utf-8'), istr(v).encode('utf-8'))
File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 142, in raise_for_ec
raise ex
ValueError: ('Invalid value for mpv option', -7, (<MpvHandle object at 0x788630b17e50>, b'background', b'#282828'))

2024-06-17 21:32:50,496 [MainThread ] [INFO ] DONE
`

@dfaker
Copy link
Owner

dfaker commented Jun 17, 2024

@broconut123 That background property was renamed in the last mpv release, patched now in #111

@broconut123
Copy link

@dfaker thanks!

@LeKite
Copy link

LeKite commented Jun 20, 2024

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

@broconut123
Copy link

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment
python -m venv envname
then activate environment with
source envname/bin/activate
then
pip install -r requirements-linux.txt
then run it with
python webmGenerator.py

@LeKite
Copy link

LeKite commented Jun 20, 2024

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment

python -m venv envname

then activate environment with

source envname/bin/activate

then

pip install -r requirements-linux.txt

then run it with

python webmGenerator.py

I will try this asap. Is mpv from AUR needed? I think I run it from arch repo

@LeKite
Copy link

LeKite commented Jun 20, 2024

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment python -m venv envname then activate environment with source envname/bin/activate then pip install -r requirements-linux.txt then run it with python webmGenerator.py

Holy it worked! Thanks! This should be added as a Linux installation guide by @dfaker Imo! Thanks a lot I really missed this on Arch :)

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

4 participants