When using the context manager with Map(...) as map:, if there is an error in setting map properties or rendering map, the errors get raised twice:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File <file>, line 296, in <module>
png = map.renderPNG()
TypeError: __exit__(): incompatible function arguments. The following argument types are supported:
1. (self: pymgl._pymgl.Map, arg0: capsule, arg1: capsule, arg2: capsule) -> None