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

BookScraper.retrieve_sports_book() in the example fails with exception #8

Open
naclomi opened this issue Mar 31, 2022 · 0 comments
Open

Comments

@naclomi
Copy link

naclomi commented Mar 31, 2022

Running the first example notebook without modifications, the first two cells complete instantly and the third fails with this traceback:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-2baded9f7e55> in <module>
----> 1 data = PointsBet.retrieve_sports_book('NBA')
      2 data

~/UW/uwseds/2022 DATA 514 projects/sports-book-manager/sports_book_manager/book_scrape_class.py in retrieve_sports_book(self, league)
    225             raise ValueError('league value must be a key within the class'
    226                              'directory')
--> 227         driver = self.__driver_initialize(self.domain,
    228                                           self.directories[league],
    229                                           self.driver_path)

~/UW/uwseds/2022 DATA 514 projects/sports-book-manager/sports_book_manager/book_scrape_class.py in __driver_initialize(self, domain, directory, path)
    259     #  open up the driver and start to pull the website data
    260     def __driver_initialize(self, domain, directory, path):
--> 261         driver = webdriver.Chrome(path)
    262         driver.get(domain + directory)
    263         time.sleep(10)

~/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
     68             service = Service(executable_path, port, service_args, service_log_path)
     69 
---> 70         super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
     71                                         port, options,
     72                                         service_args, desired_capabilities,

~/.local/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py in __init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
     88 
     89         self.service = service
---> 90         self.service.start()
     91 
     92         try:

~/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py in start(self)
     69             cmd = [self.path]
     70             cmd.extend(self.command_line_args())
---> 71             self.process = subprocess.Popen(cmd, env=self.env,
     72                                             close_fds=system() != 'Windows',
     73                                             stdout=self.log_file,

/usr/lib/python3.8/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
    856                             encoding=encoding, errors=errors)
    857 
--> 858             self._execute_child(args, executable, preexec_fn, close_fds,
    859                                 pass_fds, cwd, env,
    860                                 startupinfo, creationflags, shell,

/usr/lib/python3.8/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
   1583 
   1584             if (_USE_POSIX_SPAWN
-> 1585                     and os.path.dirname(executable)
   1586                     and preexec_fn is None
   1587                     and not close_fds

/usr/lib/python3.8/posixpath.py in dirname(p)
    150 def dirname(p):
    151     """Returns the directory component of a pathname"""
--> 152     p = os.fspath(p)
    153     sep = _get_sep(p)
    154     i = p.rfind(sep) + 1

TypeError: expected str, bytes or os.PathLike object, not NoneType
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

1 participant