Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name 'Image' is not defined #31013

Open
3 tasks done
lokeshMrudhul opened this issue Nov 21, 2024 · 2 comments
Open
3 tasks done

name 'Image' is not defined #31013

lokeshMrudhul opened this issue Nov 21, 2024 · 2 comments
Labels
alert-reports Namespace | Anything related to the Alert & Reports feature dashboard:export Related to exporting dashboards

Comments

@lokeshMrudhul
Copy link

lokeshMrudhul commented Nov 21, 2024

Bug description

Error occurring in celery worker while exporting dashboard as PDF using chrome driver

`The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\venv\Lib\site-packages\superset\tasks\scheduler.py", line 95, in execute
).run()
^^^^^
File "C:\venv\Lib\site-packages\superset\utils\decorators.py", line 266, in wrapped
return on_error(ex)
^^^^^^^^^^^^
File "C:\venv\Lib\site-packages\superset\utils\decorators.py", line 236, in on_error
raise ex
File "C:\venv\Lib\site-packages\superset\utils\decorators.py", line 259, in wrapped
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\venv\Lib\site-packages\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`

Screenshots/recordings

No response

Superset version

4.1.0

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Nov 21, 2024

To resolve the "name 'Image' is not defined" error in the Celery worker while exporting a dashboard as PDF using the Chrome driver in Superset version 4.1.0 with Python 3.11, you need to ensure that the Python Imaging Library (PIL) is installed. This error occurs because the Image module from PIL is not found. You can fix this by installing the Pillow package, which is the modern version of PIL. Run the following command to install it:

pip install Pillow

This will make the Image module available, resolving the error [1].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added alert-reports Namespace | Anything related to the Alert & Reports feature dashboard:export Related to exporting dashboards labels Nov 21, 2024
@rusackas
Copy link
Member

Could be that you're running it on Windows, which is not supported... could be any number of dependency issues (including pillow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert-reports Namespace | Anything related to the Alert & Reports feature dashboard:export Related to exporting dashboards
Projects
None yet
Development

No branches or pull requests

2 participants