-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Milestone
Description
I am trying to generate a plotly chart and save it as a PNG in memory. I have my application packaged up and running in Docker locally. I am then using AWS Lambda to run this container, but fail when the save image command runs.
I get the error:
'NoneType' object has no attribute 'encode': AttributeError
--
Traceback (most recent call last):
File "/var/task/my_app/mymodule.py", line 134, in send_report
graph_img = fig.to_image(format="png")
File "/var/lang/lib/python3.6/site-packages/plotly/basedatatypes.py", line 3743, in to_image
return pio.to_image(self, *args, **kwargs)
File "/var/lang/lib/python3.6/site-packages/plotly/io/_kaleido.py", line 132, in to_image
fig_dict, format=format, width=width, height=height, scale=scale
File "/var/lang/lib/python3.6/site-packages/kaleido/scopes/plotly.py", line 117, in transform
img = response.get("result").encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
It seems weird to me that this would be working when I run it on Docker locally, but not on lambda.
Do you have any ideas or guidance into what is happening with Kaleido so I can figure out why it is failing?
Metadata
Metadata
Assignees
Labels
No labels