You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "geido (via GitHub)" <gi...@apache.org> on 2024/11/13 11:00:47 UTC
Re: [PR] fix(empty dashboards): Check for chart-container first [superset]
geido commented on code in PR #30767:
URL: https://github.com/apache/superset/pull/30767#discussion_r1840000612
##########
superset/utils/webdriver.py:
##########
@@ -379,11 +379,19 @@ def get_screenshot(self, url: str, element_name: str, user: User) -> bytes | Non
)
)
except TimeoutException:
- logger.exception(
- "Selenium timed out waiting for chart containers to draw at url %s",
- url,
- )
- raise
+ # Check if the page has grid-container class (no chart dashboard)
+ try:
+ WebDriverWait(driver, self._screenshot_locate_wait).until(
Review Comment:
```suggestion
WebDriverWait(driver, 0).until(
```
##########
superset/utils/webdriver.py:
##########
@@ -379,11 +379,19 @@ def get_screenshot(self, url: str, element_name: str, user: User) -> bytes | Non
)
)
except TimeoutException:
- logger.exception(
- "Selenium timed out waiting for chart containers to draw at url %s",
- url,
- )
- raise
+ # Check if the page has grid-container class (no chart dashboard)
+ try:
+ WebDriverWait(driver, self._screenshot_locate_wait).until(
Review Comment:
I don't think you need wait here again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org