I have a function within which i want to save a plot to static html. It seems the way to save to static html is to call output_file() but this modifies global state which causes me a lot of other problems. I want to be able to write a function that can output to a file but not affect the global state. I tried plotting.save() but I get errors about the resources not being setup and when I explicitly pass the resources I get an error that seems to amount to the global variable _default_file not being set.
This is the latter error which I get when I try to do this:
plotting.save(file, obj=fig, resources=resources.Resources(mode=‘inline’, root_dir=None, minified=False))
Is there any way to save to static html without having to modify global state?
TypeError: 'NoneType' object is not subscriptable