sem diretorio funcionou mas usando diretorio especifico erro a baixo

WARNING:selenium.webdriver.common.selenium_manager:The geckodriver version (0.35.0) detected in PATH at /usr/local/bin/geckodriver might not be compatible with the detected firefox version (99.08); currently, geckodriver 0.31.0 is recommended for firefox 99.*, so it is advised to delete the driver in PATH and retry
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 281, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/undetected_geckodriver/driver.py", line 68, in _initialize_service
    super().__init__(command_executor=executor, options=self.options)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 238, in __init__
    self.start_session(capabilities)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 325, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/remote_connection.py", line 391, in execute
    return self._request(command_info[0], url, body=data)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/remote_connection.py", line 415, in _request
    response = self._conn.request(method, url, body=body, headers=headers, timeout=self._client_config.timeout)
  File "/databricks/python/lib/python3.9/site-packages/urllib3/request.py", line 78, in request
    return self.request_encode_body(
  File "/databricks/python/lib/python3.9/site-packages/urllib3/request.py", line 170, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/databricks/python/lib/python3.9/site-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/databricks/python/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/databricks/python/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
    raise value
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 451, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/databricks/python/lib/python3.9/site-packages/urllib3/connectionpool.py", line 340, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=59699): Read timed out. (read timeout=120)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3378, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<command-1010225242641183>", line 21, in <module>
    driver = Firefox(options=options)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/undetected_geckodriver/driver.py", line 42, in __init__
    self._initialize_service()
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/undetected_geckodriver/driver.py", line 70, in _initialize_service
    self.quit()
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 502, in quit
    self.execute(Command.QUIT)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-836dee54-a9d2-4676-9ceb-56d476997335/lib/python3.9/site-packages/selenium/webdriver/remote/remote_connection.py", line 382, in execute
    path = string.Template(path_string).substitute(params)
  File "/usr/lib/python3.9/string.py", line 121, in substitute
    return self.pattern.sub(convert, self.template)
  File "/usr/lib/python3.9/string.py", line 114, in convert
    return str(mapping[named])
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1997, in showtraceback
    stb = self.InteractiveTB.structured_traceback(
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/ultratb.py", line 1112, in structured_traceback
    return FormattedTB.structured_traceback(
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/ultratb.py", line 1006, in structured_traceback
    return VerboseTB.structured_traceback(
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/ultratb.py", line 859, in structured_traceback
    formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/ultratb.py", line 812, in format_exception_as_a_whole
    frames.append(self.format_record(r))
  File "/databricks/python/lib/python3.9/site-packages/IPython/core/ultratb.py", line 730, in format_record
    result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))
  File "/databricks/python/lib/python3.9/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.9/site-packages/stack_data/core.py", line 698, in lines
    pieces = self.included_pieces
  File "/databricks/python/lib/python3.9/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.9/site-packages/stack_data/core.py", line 649, in included_pieces
    pos = scope_pieces.index(self.executing_piece)
  File "/databricks/python/lib/python3.9/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.9/site-packages/stack_data/core.py", line 628, in executing_piece
    return only(
  File "/databricks/python/lib/python3.9/site-packages/executing/executing.py", line 164, in only
    raise NotOneValueFound('Expected one value, found 0')
executing.executing.NotOneValueFound: Expected one value, found 0




def get_photo(driver):
    driver.save_screenshot('foto.png')
    plt.figure(figsize=(15,8))
    img = mpimg.imread('foto.png')
    imgplot = plt.imshow(img)
    plt.grid(False)
    plt.axis('off')
    plt.legend()
    plt.show()

display_ = Display(visible=0, size=(1400, 900))
display_.start()

options=Options()
profile = FirefoxProfile(r"./UserFirefox1/UserFirefox1")
options.profile = profile
# profile.set_preference("useAutomationExtension", False)
# profile.set_preference("dom.webdriver.enabled", False)
# profile.update_preferences()

driver = Firefox(options=options)