Commit cce9781
authored
Fix improper JSON encoding exception when pillow module not installed (#1993)
4.4.0 regression. When the pillow module is not installed, and an attempt is made to JSON serialize a figure that includes unsupported object types, an "AttributeError: 'NoneType' object has no attribute 'Image'" exception was raised.
With this fix, the proper TypeError exception is raised once more.1 parent 89f4c5b commit cce9781
File tree
2 files changed
+6
-2
lines changed- packages/python/plotly
- _plotly_utils
- plotly/tests/test_core/test_utils
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
0 commit comments