maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
653 stars 162 forks source link

Shell command PID xxxx returned an abnormal error code: '4294967295' #48

Open suban1440 opened 4 years ago

suban1440 commented 4 years ago

Hi

I got a Error message.

How solve?

My environment:

Windows10 64bit python 3.8 phantomjs 2.5.0-development webscreenshot 2.9

C:\Program Files\Python38\Lib\site-packages\webscreenshot> python .\webscreenshot.py http://www.google.co.kr -r phantomjs --renderer-binary "C:\Program Files\phantomjs-2.5.0-beta-windows\bin\phantomjs.exe"

webscreenshot.py version 2.9

[+] 1 URLs to be screenshot
[ERROR][http://www.google.co.kr:80] Shell command PID 5012 returned an abnormal error code: '4294967295'
[ERROR][http://www.google.co.kr:80] Screenshot somehow failed

[+] 0 actual URLs screenshot
[+] 1 error(s)
    http://www.google.co.kr:80
maaaaz commented 4 years ago

Could you try with the latest phantomjs stable build 2.1.1 ? https://bitbucket.org/ariya/phantomjs/downloads/

emanuelbeni commented 4 years ago

Hi, I am having the same problem as @suban1440 , and my phantomJs version is 2.1.1 @maaaaz . Anybody solved this problem yet?

maaaaz commented 4 years ago

Can you launch the webscreenshot command with the -vv option; then copy/paste the "raw" command to be launched (like <path to phantomjs.exe> -debug ...) ?

emanuelbeni commented 4 years ago

Hi, I wasn't able to use the '-vv' option, but I realized that it is not listed in the webscreenshot.py menu too.

'webscreenshot.py: error: Please specify a valid input file or a valid URL'

Thats what I get from launching the 'python webscreenshot.py -vv'

gsneijd commented 4 years ago

Hi, I had the same error msg on my Win10. I think it was the SPACE in my folder name. I tried to start the script in a folder without a SPACE and it worked for me.

maaaaz commented 4 years ago

@gsneijd, could you launch the command you tried with the space in folder, adding the -vv option to see the raw command executed (the one calling the renderer) ?

gsneijd commented 4 years ago

@maaaaz Sure! The RAW command works with quotes around the screenshot path

(env) O:\Eigene Dateien\Web-Projekte\webscreenshot>chromium.exe --allow-running-insecure-content --ignore-certificate-errors --ignore-urlfetcher-cert-requests --reduce-security-for-testing --no-sandbox --headless --disable-gpu --hide-scrollbars --incognito -screenshot="O:\Eigene Dateien\Web-Projekte\webscreenshot\screenshots\https_www.mynode.at_443.png" --window-size=1200,800 https://www.mynode.at:443 webscreenshot-raw-output.txt

maaaaz commented 4 years ago

@gsneijd great, but that was your first try ? with the screenshot output folder containing a space ?

Weird that it didn't work, I remember designing that function to support Windows, and space wasn't needed. I have to investigate !

gsneijd commented 4 years ago

I've had already problems with the space character in other application, so that was my first try. I started the script in O:\webscreenshot, and it did also work.

i hope it helps you! thanks for you great script, it saved me a lot of work :)

maaaaz commented 4 years ago

I have investigated and yes, there is the infamous issue with Python + subprocess + whitespaces in paths I don't have an easy solution, I will see if I want to include (or not) the mslex third-party lib.

In the meantime, no whitespace in paths when using webscreenshot on Windows :)

arahman63 commented 1 year ago

Hi have you found the solution to the whitespaces problem?

badboyilprimo commented 1 year ago

Hi have you found the solution to the whitespaces problem?

only by adding the folder without spaces directly in C: