Wkhtmltopdf error ERPNext V8

Hello All,

i have install ERPNext V8, but I got some error,

TASK [download wkthmltox linux] ************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “dest”: “/tmp/wkhtmltox.tar.xz”, “failed”: true, “msg”: “Request failed”, “response”: “Request failed: ”, “state”: “absent”, “status_code”: -1, “url”: “http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz”}
to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=15 changed=1 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 329, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 279, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

I try to use this method to solve Wkhtmltopdf error ERPNext V7, but still got error.

Thanks your help

Try copying and pasting the download URL in the browser and check if it works. The server may be down or the file may be missing.
http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz

Thanks your help,

Can not download from this link http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz, I try to download wkhtmltox manually.

root@ubuntu:~/Downloads# ll
total 135644
drwxr-xr-x 4 root root 4096 May 30 09:48 ./
drwx------ 5 root root 4096 May 30 12:58 …/
drwxr-xr-x 3 root root 4096 May 30 09:28 Downloads/
drwxrwxr-x 6 root root 4096 Nov 22 2016 wkhtmltox/
-rw-r–r-- 1 root root 124702720 May 25 18:29 wkhtmltox-0.12.4_linux-generic-amd64.tar
-rw-r–r-- 1 root root 14541904 May 25 18:29 wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

then run install command again, but still got the error.
sudo python install.py --production

did I miss any steps?

Thanks again

gna.org is down for the past few days. Is the site closed permanently ?
@nabinhait please check. Install scripts will fail due to this.
this can be used in the future for 0.12.2.1 i guess:
https://downloads.wkhtmltopdf.org/0.12/0.12.2.1/

Hi All,

Sorry, have any suggestion on this issue? Or any manually method I can try?

Thanks

@hellorachel,

wkhtml2pdf download url is already updated into the bench repo, Please pull the latest changes of bench-repo then try to install.

https://github.com/frappe/bench/blob/master/playbooks/develop/includes/wkhtmltopdf.yml#L3

Hi makarand_b,

Thanks, wkhtml2pdf can be download now. But I have another error in init bench.

TASK [init bench] **************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home/frappe/frappe-bench”, “–frappe-branch”, “master”], “delta”: “0:00:06.257440”, “end”: “2017-06-01 08:37:07.593473”, “failed”: true, “rc”: 1, “start”: “2017-06-01 08:37:01.336033”, “stderr”: “Command "/home/frappe/frappe-bench/env/bin/python -c "import setuptools, tokenize;file=‘/home/frappe/frappe-bench/env/src/pdfkit/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))" develop --no-deps" failed with error code 1 in /home/frappe/frappe-bench/env/src/pdfkit/\nTraceback (most recent call last):\n File "/usr/local/bin/bench", line 11, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File "/home/frappe/.bench/bench/cli.py", line 40, in cli\n bench_command()\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/.bench/bench/commands/make.py", line 19, in init\n verbose=verbose, clone_from=clone_from)\n File "/home/frappe/.bench/bench/utils.py", line 46, in init\n setup_env(bench_path=path)\n File "/home/frappe/.bench/bench/utils.py", line 134, in setup_env\n exec_cmd(‘./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit’, cwd=bench_path)\n File "/home/frappe/.bench/bench/utils.py", line 127, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: ./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit”, “stdout”: “Already using interpreter /usr/bin/python”, “stdout_lines”: [“Already using interpreter /usr/bin/python”], “warnings”: }
to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=32 changed=20 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 329, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 279, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Thanks your help again.

are you running python 2.7.9?

Hi MCD-50

I am not sure python version. Should I install python 2.7.9 manually?

Thanks your reply

The error is
./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit

Goto

and install this and then install bench again

Hi MCD-50,

Thanks your kindly help.