Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python subprocess returned non-zero exit status -6

Tags:

python

django

this is my first post on stackoverflow. I hope my question is not to stupid:)

I'm using django to develop a website, inside the django I need to grab thumbnail of website, so I use https://github.com/coderholic/PyWebShot to achieve it.

I run PyWebShot in django shell with subprocess it work well, but when I put django into apache2 and access it with a url then it fail.

Here is the error message:

CalledProcessError at GIVEN_URL

Command '['echo', '$HOME']' returned non-zero exit status -6

It fail on this command actually:

subprocess.check_output(['echo', '$HOME'])

I've tried write output and error of the process into a file, but the file always empty.

I'm hoping someone can give me a note or direction, Thanks!

ps: If need more information please just let me know.

like image 810
Rasiel Chang Avatar asked Dec 11 '25 19:12

Rasiel Chang


1 Answers

I check Apache error logs and find a strange error. After that I surf the internet and found it is a old python2.7 error. So I patch it then solved this problem! Thanks everybody.

like image 69
Rasiel Chang Avatar answered Dec 13 '25 09:12

Rasiel Chang