ishandutta2007
ishandutta2007

Reputation: 18194

What should be the path of browsermob-proxy when installed as pypi package

$pip install browsermob-proxy

Downloaded and extracted the binary from https://bmp.lightbody.net to /Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/

from browsermobproxy import Server
dict = {'port': 8090}
server = Server(options=dict)
server = Server(path="/Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/bin/browsermob-proxy", options=dict)

Browsermob-Proxy binary couldn't be found in path provided: browsermob-proxy

Following: https://github.com/AutomatedTester/browsermob-proxy-py

$ ls -l "/Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/bin"

total 16
-rwxr--r--@ 1 ishandutta2007  staff   781B Dec 26  2016 browsermob-proxy*
-rwxr--r--@ 1 ishandutta2007  staff   2.7K Dec 24  2016 browsermob-proxy.bat*
drwxrwxr-x@ 3 ishandutta2007  staff   102B Sep  5 01:07 conf/

$ ls -l "/Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/bin/browsermob-proxy"

-rwxr--r--@ 1 ishandutta2007  staff   781B Dec 26  2016 /Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/bin/browsermob-proxy*

Upvotes: 2

Views: 2447

Answers (1)

Celso Jr
Celso Jr

Reputation: 295

Try to add the actual directory to the PATH

echo 'export PATH=$PATH:/Users/ishandutta2007/Downloads/browsermob-proxy-2.1.4/bin' >> ~/.bashrc

This way you don't have to specify the path arg on the Server instance manually

from browsermobproxy import Server
dict = {'port': 8090}
server = Server(options=dict)

Upvotes: 0

Related Questions