Catalyst state with PNG extract, Attribute CompressionLevel does not exist
@utkarsh.ayachit @cory.quammen
Found this when fiddling with 5.9.1-RC1 and the image extracts. When saving an image extract and changing the compression level to 0, the resulting catalyst state file cannot be run due to the error AttributeError: Attribute CompressionLevel does not exist.
To reproduce:
- Wavelet source -> Show surface -> color by RTData
- Create PNG image extract, set compression level to 0
- File -> Save Catalyst State (
wavelet_png_extract.py
) - pvbatch wavelet_png_extract.py
$ /Applications/ParaView-5.9.1-RC1.app/Contents/bin/pvbatch ./wavelet_png_extract.py
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File "/Applications/ParaView-5.9.1-RC1.app/Contents/Python/paraview/servermanager.py", line 479, in __setattr__
setter = getattr(self.__class__, name)
AttributeError: type object 'PNG' has no attribute 'CompressionLevel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/ParaView-5.9.1-RC1.app/Contents/Python/paraview/servermanager.py", line 485, in __setattr__
_bc.setattr(self, name, value)
File "/Applications/ParaView-5.9.1-RC1.app/Contents/Python/paraview/_backwardscompatibilityhelper.py", line 335, in setattr
raise AttributeError()
AttributeError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./wavelet_png_extract.py", line 136, in <module>
pNG1.Writer.Format.CompressionLevel = '0'
File "/Applications/ParaView-5.9.1-RC1.app/Contents/Python/paraview/servermanager.py", line 492, in __setattr__
raise AttributeError("Attribute %s does not exist. " % name +
AttributeError: Attribute CompressionLevel does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.