Tim-Hodge commented on issue #31013:
URL: https://github.com/apache/superset/issues/31013#issuecomment-2624797393
Also seeing this issue in 4.1.1 with Firefox. PDF exports from a dashboard
via UI are working.
Stacktrace:
```
[2025-01-30 15:06:20,966: ERROR/ForkPoolWorker-1] An unexpected error
occurred while executing the report: f79163ce-f368-4041-82c3-c6ed80b8b8d1
Traceback (most recent call last):
File "/app/superset/commands/report/execute.py", line 799, in run
).run()
File "/app/superset/utils/decorators.py", line 266, in wrapped
return on_error(ex)
File "/app/superset/utils/decorators.py", line 236, in on_error
raise ex
File "/app/superset/utils/decorators.py", line 259, in wrapped
result = func(*args, **kwargs)
File "/app/superset/commands/report/execute.py", line 761, in run
).next()
File "/app/superset/commands/report/execute.py", line 629, in next
self.send()
File "/app/superset/commands/report/execute.py", line 527, in send
notification_content = self._get_notification_content()
File "/app/superset/commands/report/execute.py", line 414, in
_get_notification_content
pdf_data = self._get_pdf()
File "/app/superset/commands/report/execute.py", line 281, in _get_pdf
pdf = build_pdf_from_screenshots(screenshots)
File "/app/superset/utils/pdf.py", line 34, in build_pdf_from_screenshots
img = Image.open(BytesIO(snap))
NameError: name 'Image' is not defined. Did you mean: 'images'?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/tasks/scheduler.py", line 95, in execute
).run()
File "/app/superset/utils/decorators.py", line 266, in wrapped
return on_error(ex)
File "/app/superset/utils/decorators.py", line 236, in on_error
raise ex
File "/app/superset/utils/decorators.py", line 259, in wrapped
result = func(*args, **kwargs)
File "/app/superset/commands/report/execute.py", line 803, in run
raise ReportScheduleUnexpectedError(str(ex)) from ex
superset.commands.report.exceptions.ReportScheduleUnexpectedError: name
'Image' is not defined
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]