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

"AttributeError: 'YahooBackupScraper' object has no attribute 'br'" when running with Firefox driver #49

Open
logological opened this issue Oct 17, 2019 · 5 comments

Comments

@logological
Copy link

Running yahoo-groups-backup.py scrape_files $GROUPNAME fails with the following message:

Traceback (most recent call last):
  File "./yahoo-groups-backup.py", line 129, in <module>
    main()
  File "./yahoo-groups-backup.py", line 125, in main
    arguments, cfg_args)
  File "./yahoo-groups-backup.py", line 103, in invoke_subcommand
    return module.command(args)
  File "/home/psy/tmp/yahoo-groups-backup/yahoo_groups_backup/subcommands/scrape_files.py", line 26, in command
    password=arguments['--password'])
  File "/home/psy/tmp/yahoo-groups-backup/yahoo_groups_backup/scraper.py", line 29, in __init__
    self.br = splinter.Browser(driver)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/splinter/browser.py", line 63, in Browser
    return driver(*args, **kwargs)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/splinter/driver/webdriver/firefox.py", line 39, in __init__
    self.driver = Firefox(firefox_profile)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 81, in __init__
    self.binary, timeout)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
    self._wait_until_connectable(timeout=timeout)
  File "/home/psy/tmp/yahoo-groups-backup/venv/lib/python3.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 106, in _wait_until_connectable
    % (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmpt8sz3hub If you specified a log_file in the FirefoxBinary constructor, check it for details.

Exception ignored in: <bound method YahooBackupScraper.__del__ of <yahoo_groups_backup.scraper.YahooBackupScraper object at 0x7f030b767cc0>>
Traceback (most recent call last):
  File "/home/psy/tmp/yahoo-groups-backup/yahoo_groups_backup/scraper.py", line 32, in __del__
    self.br.quit()
AttributeError: 'YahooBackupScraper' object has no attribute 'br'

This particular problem does not occur when using the chrome driver instead, though this driver fails for other reasons (for which I will file a separate report).

@ashpland
Copy link

pip install -U selenium got me past this, though now something is failing in Firefox on the login page. (Still, a step forward!)

Stackoverflow where I found this.

@hrenfroe
Copy link
Contributor

I can't find the citation now, but FF 53 changed a default setting so that it uses the JSON viewer by default, which confuses Selenium. I tried to initialize the temporary profile with the setting to disable it, but gave up and used Chromedriver instead.

@ejheil
Copy link

ejheil commented Oct 18, 2019

This is exactly where I'm at re: firefox failures

Dumb question, but possibly useful to people who end up here: how do I make selenium use the chrome driver instead?

OS: MacOS Mojave

@hrenfroe
Copy link
Contributor

You want ./yahoo-groups-backup.py scrape_messages --driver chrome your_group_name_here. You are likely to run into issues detecting the login page after that, and I recommend my fork to deal with that.

@ejheil
Copy link

ejheil commented Oct 19, 2019

Thanks! Hope to get your fork working.

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

4 participants