Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,846
    • Issues 1,846
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 87
    • Merge requests 87
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaView
  • ParaViewParaView
  • Issues
  • #20625

Closed
Open
Created Apr 06, 2021 by John Patchett@patchett2002Developer

Catalyst Script Generation and Use: type object 'PNG' has no attribute 'MetaData'

pvbatch and catalyst complain type object 'PNG' has no attribute 'MetaData' if you add any metadata to the PNG writer in the extract properties. To recreate:

  • load a data set and show surface
  • create a PNG extract
  • in properties panel, in image options, add a second line: user, me
  • save catalyst state - pick a script name
  • run the saved script with pvbatch

Below shows two scripts, the first one I saved without making a change to the image properties, it works. The second one I created by changing the user prorperties, it fails with MetaData error.

`pn1933613:~ patchett$ diff pvhead_catalyststate3.py pvhead_catalyststate4.py
96a97,99
> # init the 'PNG' selected for 'Format'
> pNG1.Writer.Format.MetaData = ['Application', 'ParaView', 'user', 'patchett']
> 
pn1933613:~ patchett$ 
pn1933613:~ patchett$ /Applications/ParaView-5.9.0-858-gca61cc8736.app/Contents/bin/pvbatch pvhead_catalyststate3.py 
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
pn1933613:~ patchett$ /Applications/ParaView-5.9.0-858-gca61cc8736.app/Contents/bin/pvbatch pvhead_catalyststate4.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.0-858-gca61cc8736.app/Contents/Python/paraview/servermanager.py", line 479, in __setattr__
    setter = getattr(self.__class__, name)
AttributeError: type object 'PNG' has no attribute 'MetaData'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/ParaView-5.9.0-858-gca61cc8736.app/Contents/Python/paraview/servermanager.py", line 485, in __setattr__
    _bc.setattr(self, name, value)
  File "/Applications/ParaView-5.9.0-858-gca61cc8736.app/Contents/Python/paraview/_backwardscompatibilityhelper.py", line 363, in setattr
    raise AttributeError()
AttributeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pvhead_catalyststate4.py", line 98, in <module>
    pNG1.Writer.Format.MetaData = ['Application', 'ParaView', 'user', 'patchett']
  File "/Applications/ParaView-5.9.0-858-gca61cc8736.app/Contents/Python/paraview/servermanager.py", line 492, in __setattr__
    raise AttributeError("Attribute %s does not exist. " % name +
AttributeError: Attribute MetaData 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.

@utkarsh.ayachit @cory.quammen

Edited Apr 20, 2021 by Ethan Stam
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking