[qutebrowser] How to run a userscript in Windows
David Nebauer
davidnebauer3 at bigpond.com
Sun Aug 28 03:38:04 CEST 2016
On linux I can successfully run a userscript by placing it in
~/.local/share/qutebrowser/userscripts
and running the following command in qutebrowser:
:spawn --userscript SCRIPT.py
where SCRIPT.py is the script file name. I can also run the same command
with the full script filepath:
:spawn --userscript ~/.local/share/qutebrowser/userscripts/SCRIPT.py
On windows I placed the same script in
C:\Users\ME\AppData\Local\qutebrowser\userscripts
where ME is my windows user account name. The python launcher is set up
such that python scripts can run directly from the command line.
Running this command in qutebrowser:
:spawn --userscript SCRIPT.py
resulted in the error:
Error while spawning userscript: The process failed to start.
The same error occurs if the full path is used:
:spawn --userscript
C:\Users\ME\AppData\Local\qutebrowser\userscripts\SCRIPT.py
In fact, the same error occurs if I use a nonsense, non-existent script
name or path, so a possible cause of the errors is that qutebrowser is
unable to locate the script filein windows.
I also tried the following variations:
:spawn --userscript SCRIPT
:spawn --userscript
C:\Users\ME\AppData\Local\qutebrowser\userscripts\SCRIPT
:spawn --userscript
file:///C:/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT.py
:spawn --userscript
file:///C:/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT
:spawn --userscript
file:///C/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT.py
:spawn --userscript
file:///C/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT
but all resulted in the same error message.
How do you run userscripts in windows?
-------------------------------------------------------------
qutebrowser v0.8.2
Git commit: v0.8.2-dirty (2016-08-02 18:33:59 +0200)
CPython: 3.4.3
Qt: 5.5.1
PyQt: 5.5.1
sip: 4.17
colorama: 0.3.7
pypeg2: 2.15
jinja2: 2.8
pygments: 2.1.3
yaml: 3.11
cssutils: 1.0.1 $Id$
typing: no
PyQt5.QtWebEngineWidgets: no
pdf.js: 1.4.20 (bundled)
Webkit: 538.1
Harfbuzz: system
SSL: OpenSSL 1.0.1i 6 Aug 2014
Style: QWindowsVistaStyle
Platform: Windows-7-6.1.7601-SP1, 64bit
Desktop: None
Frozen: True
Imported from C:\Program Files\qutebrowser\library.zip\qutebrowser
OS Version: 7, 6.1.7601, SP1, Multiprocessor Free
More information about the qutebrowser
mailing list