ffpb icon indicating copy to clipboard operation
ffpb copied to clipboard

Compiling into single EXE, sh code issues on Windows machine

Open r3538987 opened this issue 5 years ago • 5 comments

When compiling with pyinstaller into single exe, error occurs: ImportError: sh 1.12.14 is currently only supported on linux and osx. please install pbs 0.110 After installing pbs, it's still presented. Seems like WindowsOS does not like sh code. There is workaround https://stackoverflow.com/questions/28618906/porting-sh-1-11-based-code-to-windows But I don't know how to implement it into existing code.

r3538987 avatar Jan 16 '19 16:01 r3538987

I added a patch but I don't have a Windows machine to test it on. Can you try installing the latest master and see if you get can a basic example to work ?

Thanks a lot for taking the time to find a workaround by the way !

althonos avatar Jan 25 '19 23:01 althonos

`[10676] Failed to execute script ffpb Traceback (most recent call last): File "ffpb.py", line 172, in main File "site-packages\pbs.py", line 448, in call OSError: [Errno 22] Invalid argument: '<main.ProgressNotifier object at 0x000001F185E5E0B8>'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "ffpb.py", line 190, in File "ffpb.py", line 177, in main NameError: name 'sh' is not defined ` There pops up in file log, when I'm trying to run batch file to check file integrity.

r3538987 avatar Jan 26 '19 08:01 r3538987

After checking a bit more in-depth on my PC, I don't think this is possible to do right now: I use a sh feature that is not supported by pbs (calling a callback on the command streamed output) so I unfortunately cannot use pbs as-is.

althonos avatar Jan 26 '19 14:01 althonos

On Windows, as of 8/8/2020, ffpb can't be used as CLI on Windows, with the same issue:

  File "C:\Users\Seb\AppData\Roaming\Python\Python38\site-packages\ffpb.py", line 43, in <module>
    import sh
  File "C:\Users\Seb\AppData\Roaming\Python\Python38\site-packages\sh.py", line 34, in <module>
    raise ImportError("sh %s is currently only supported on linux and osx. \
ImportError: sh 1.13.1 is currently only supported on linux and osx. please install pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows support.

sebastienvercammen avatar Aug 08 '20 11:08 sebastienvercammen

After checking a bit more in-depth on my PC, I don't think this is possible to do right now: I use a sh feature that is not supported by pbs (calling a callback on the command streamed output) so I unfortunately cannot use pbs as-is.

that's unfortunate is there any other work around?

alexonpeace avatar Aug 13 '20 17:08 alexonpeace