Instapy: how to switch to firefox?

Created on 31 Aug 2017  Â·  11Comments  Â·  Source: timgrossmann/InstaPy

i install firefox:
apt-get install firefox & install geckodriver.
but InstaPy report error:
Traceback (most recent call last): File "quickstart.py", line 8, in <module> session = InstaPy(username=insta_username, password=insta_password, nogui=True,use_firefox=True, page_delay=25) File "/root/InstaPy/instapy/instapy.py", line 100, in __init__ self.set_selenium_local_session() File "/root/InstaPy/instapy/instapy.py", line 116, in set_selenium_local_session self.browser = webdriver.Firefox(firefox_profile=firefox_profile) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__ self.binary, timeout) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__ self.binary.launch_browser(self.profile, timeout=timeout) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable % (self.profile.path)) selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmp5x1lr6gu If you specified a log_file in the FirefoxBinary constructor, check it for details.

help wanted

Most helpful comment

Same

All 11 comments

Mine is not working either.
The error shown is this:
Traceback (most recent call last): File "firefoxexample.py", line 19, in <module> .set_switch_language(True)\ File "C:\Users\pedro\Desktop\Github\InstaPy\instapy\instapy.py", line 161, in login if not login_user(self.browser, self.username, self.password, self.switch_language): File "C:\Users\pedro\Desktop\Github\InstaPy\instapy\login_util.py", line 21, in login_user action = ActionChains(browser).move_to_element(login_elem).click().perform() File "C:\Users\pedro\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\action_chains.py", line 77, in perform self.w3c_actions.perform() File "C:\Users\pedro\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\actions\action_builder.py", line 76, in perform self.driver.execute(Command.W3C_ACTIONS, enc) File "C:\Users\pedro\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 297, in execute self.error_handler.check_response(response) File "C:\Users\pedro\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (932.5, 666) is out of bounds of viewport width (1366) and height (659)

@hoangsoft90 have you specified InstaPy.firefox_profile_path or just leaved it by default?

leave by default

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.
www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Sep 8, 2017 at 1:17 AM, 1pyxa1 notifications@github.com wrote:

@hoangsoft90 https://github.com/hoangsoft90 have you specified
InstaPy.firefox_profile_path or just leaved it by default?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/timgrossmann/InstaPy/issues/614#issuecomment-327881743,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIFceCPB8Nc5JgMvhIrg4LjS-lnM0LtTks5sgDNLgaJpZM4PIfyu
.

hey @hoangsoft90 @peguilherme77 @1pyxa1 ,
take a look https://github.com/timgrossmann/InstaPy#switching-to-firefox

i set True parameter in instapy.py for using firefox
after quickstart execution it giving me error
```
File "quickstart.py", line 8, in
session = InstaPy(username=insta_username, password=insta_password)
File "/media/stark/afebc556-6185-4b48-81b3-bc81f3987dd8/InstaPy/instapy/instapy.py", line 128, in __init__
self.set_selenium_local_session()
File "/media/stark/afebc556-6185-4b48-81b3-bc81f3987dd8/InstaPy/instapy/instapy.py", line 152, in set_selenium_local_session
self.browser = webdriver.Firefox(firefox_profile=firefox_profile)
File "/home/stark/.local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__
self.binary, timeout)
File "/home/stark/.local/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/stark/.local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/stark/.local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable
% (self.profile.path))

selenium.common.exceptions.WebDriverException: Message: Can't load the profile.
Profile Dir: /tmp/tmp8I4eTN If you specified a log_file in the FirefoxBinary constructor, check it for details.```

Same issue here on latest firefox browsers

Same issue here with firefox.

Same

same issue here

Same here.

Same here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tibor picture tibor  Â·  3Comments

neomh picture neomh  Â·  3Comments

deronsizemore picture deronsizemore  Â·  3Comments

CharlesCCC picture CharlesCCC  Â·  3Comments

v77v picture v77v  Â·  3Comments