File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -272,10 +272,13 @@ def run(self):
272
272
f"{ clsname } ().render()" ,
273
273
]
274
274
275
- with tempconfig (example_config ):
276
- run_time = timeit (lambda : exec ("\n " .join (code ), globals ()), number = 1 )
277
- video_dir = config .get_dir ("video_dir" )
278
- images_dir = config .get_dir ("images_dir" )
275
+ try :
276
+ with tempconfig (example_config ):
277
+ run_time = timeit (lambda : exec ("\n " .join (code ), globals ()), number = 1 )
278
+ video_dir = config .get_dir ("video_dir" )
279
+ images_dir = config .get_dir ("images_dir" )
280
+ except Exception as e :
281
+ raise RuntimeError (f"Error while rendering example { clsname } " ) from e
279
282
280
283
_write_rendering_stats (
281
284
clsname ,
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ def default(self, obj: Any):
207
207
del cvardict [i ]
208
208
try :
209
209
code = inspect .getsource (obj )
210
- except OSError :
210
+ except ( OSError , TypeError ) :
211
211
# This happens when rendering videos included in the documentation
212
212
# within doctests and should be replaced by a solution avoiding
213
213
# hash collision (due to the same, empty, code strings) at some point.
You can’t perform that action at this time.
0 commit comments