Python GetLookupTableNames() call fails
I get this error when calling GetLookupTableNames()
in pvpython
:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/ParaView-5.4.0.app/Contents/Python/paraview/simple.py", line 1382, in GetLookupTableNames
return _GetLUTReaderInstance().GetLUTNames()
File "/Applications/ParaView-5.4.0.app/Contents/Python/paraview/simple.py", line 1361, in _GetLUTReaderInstance
import lookuptable
ImportError: No module named lookuptable
the _GetLUTReaderInstance()
function looks something like this:
_lutReader = None
def _GetLUTReaderInstance():
""" Internal api. Return the lookup table reader singleton. Create
it if needed."""
global _lutReader
if _lutReader is None:
import lookuptable
_lutReader = lookuptable.vtkPVLUTReader()
return _lutReader
I tried explicitly importing lookuptable
with from paraview import lookuptable
, but this doesn't seem to help.
I then tried to call lookuptable.vtkPVLUReader()
manually, but got another error:
WARNING: default LUTs not found at /Applications/ParaView-5.4.0.app/Contents/Python/paraview/ColorMaps.xml
It appears to fail to find any colour maps, returning an empty list:
>>> lookuptable.vtkPVLUTReader().GetLUTNames()
WARNING: default LUTs not found at /Applications/ParaView-5.4.0.app/Contents/Python/paraview/ColorMaps.xml
[]
I noticed that the ColorMaps.xml
does not exist in my ParaView installation. I looked back through the binaries on the website and the last version it existed in is ParaView 5.1.2.