GitHub user dosubot[bot] added a comment to the discussion: Superset get
screenshot occurred exception:AttributeError: 'dict' object has no attribute
'path
<!-- Answer -->
The error happens because the Selenium Chrome WebDriver expects a Service
object, but your config passes a dictionary with a key ('log_output') that
doesn't match what Selenium expects. The correct key is 'log_path'. Superset
unpacks your 'service' dict directly into the Selenium Service constructor, so
any mismatch causes this kind of error
([source](https://github.com/apache/superset/blob/4718767ddbe406ffcb7a31b39f0396530df15141/superset/utils/webdriver.py)).
To fix it, update your config like this:
```python
WEBDRIVER_CONFIGURATION = {
"service": {
"executable_path": "/usr/local/bin/chromedriver",
"log_path": "/var/log/superset", # <-- use 'log_path' instead of
'log_output'
"service_args": [],
"port": 0,
"env": {},
},
"options": {
"capabilities": {},
"preferences": {},
"binary_location": "",
},
}
```
This should resolve the AttributeError and allow screenshot generation to work
as expected. For reference, see the discussion and code details
[here](https://github.com/apache/superset/discussions/34053) and
[here](https://github.com/apache/superset/blob/4718767ddbe406ffcb7a31b39f0396530df15141/superset/utils/webdriver.py).
Other common pitfalls: make sure all keys in your 'service' dict match the
arguments expected by Selenium's Service class, and avoid using settings like
WEBDRIVER_EXECUTABLE_PATH, which Superset ignores.
<!-- 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/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/dce9a742-f718-4330-a074-47c7adc977e4?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34062)
GitHub link:
https://github.com/apache/superset/discussions/34062#discussioncomment-13658617
----
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]