GitHub user dosubot[bot] added a comment to the discussion: Superset get 
screenshot occurred err:AttributeError: 'dict' object has no attribute 'path'

<!-- Answer -->
The error happens because Selenium expects the service parameter to be a 
Service object, not a plain dict. Superset is supposed to take the service dict 
from WEBDRIVER_CONFIGURATION and internally convert it to a Service object 
before passing it to Selenium. If that conversion doesn't happen (for example, 
if the dict is passed directly), you'll see the AttributeError you described.

Your configuration is correct for Superset—just make sure you are not 
overriding or directly passing the service dict to Selenium yourself. Superset 
should handle the conversion internally, as shown in its codebase, by calling 
service_class(**driver_srv) with your dict values. Here’s a reference example 
of the recommended config:

```python
WEBDRIVER_TYPE = "chrome"
WEBDRIVER_CONFIGURATION = {
    "service": {
        "executable_path": "/usr/local/bin/chromedriver",
        "log_output": "/var/log/superset",
        "service_args": [],
        "port": 0,
        "env": {},
    },
    "options": {
        "capabilities": {},
        "preferences": {},
        "binary_location": "",
    },
}
WEBDRIVER_OPTION_ARGS = [
    "--headless",
    "--no-sandbox",
    "--disable-gpu",
    "--disable-dev-shm-usage",
    "--disable-setuid-sandbox",
    "--start-maximized",
]
```
Superset will handle the conversion if you use this pattern in 
superset_config.py. If you are still seeing the error, double-check that you 
are not customizing the instantiation logic elsewhere, and that you are running 
a compatible version of Superset and Selenium where this conversion is 
supported. For more details, see [this 
discussion](https://github.com/apache/superset/discussions/34053) and [the 
relevant 
code](https://github.com/apache/superset/blob/b9052fa46173b0172c7f4349ed0194e441a97ed8/superset/utils/webdriver.py).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/43fa22d6-4845-47c4-a7a7-fa8fbbfefeb3?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34061)

GitHub link: 
https://github.com/apache/superset/discussions/34061#discussioncomment-13658170

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to