Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.start() gives error #52

Closed
jansvitak opened this issue May 6, 2016 · 2 comments
Closed

server.start() gives error #52

jansvitak opened this issue May 6, 2016 · 2 comments

Comments

@jansvitak
Copy link

jansvitak commented May 6, 2016

Hi everyone,

I'm trying to run a PhantomJS webdriver with BrowserMob-proxy using Selenium in Python. It's the first time for me and the basic "getting started" code provided here is already returning error.

from browsermobproxy import Server
server = Server('browsermob-proxy-2.0.0\\bin\\browsermob-proxy') #I also tried browsermob-proxy-2.1.0-beta-6 but the error stays the same
server.start()
proxy = server.create_proxy()

I get this error:

>>> server.start()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...\Python27\lib\site-packages\browsermobproxy\server.py", line 104, in start
    raise Exception("Can't connect to Browsermob-Proxy")
Exception: Can't connect to Browsermob-Proxy

I downloaded the Python library simply with pip install browsermob-proxy. (version 0.7.0)

I downloaded both versions of BrowserMob proxy from https://github.com/lightbody/browsermob-proxy/releases

I'm using Python 2.7.11 on Windows 10.

Any idea what I'm doing wrong? It seems like I'm stuck at the very start and I'm clueless as I don't have virtually any experience with this.

Any help would be much appreciated!

@mbcc2006
Copy link

you hava a wrong path , you can use absolute path like this r"D:\tobao\bbp\bin\browsermob-proxy" ,do not add '.bat'

@AutomatedTester
Copy link
Owner

as @mbcc2006 said, you need to make sure it goes to the browsermob executable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants