Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textures cannot be saved #3227

Open
banesullivan opened this issue Aug 29, 2022 · 0 comments
Open

Textures cannot be saved #3227

banesullivan opened this issue Aug 29, 2022 · 0 comments
Labels
bug Uh-oh! Something isn't working as expected.

Comments

@banesullivan
Copy link
Member

banesullivan commented Aug 29, 2022

Describe the bug, what's wrong, and what you expected.

the save() method on Texture objects fails.

see also #3119

Steps to reproduce the bug.

from pyvista import examples

tex = examples.load_globe_texture()
tex.save('~/Desktop/texture.png')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 tex.save('~/Desktop/texture.png')

File ~/Software/pyvista/pyvista/pyvista/core/dataobject.py:125, in DataObject.save(self, filename, binary, texture)
    123 file_ext = file_path.suffix
    124 if file_ext not in self._WRITERS:
--> 125     raise ValueError(
    126         'Invalid file extension for this data type.'
    127         f' Must be one of: {self._WRITERS.keys()}'
    128     )
    130 # store complex and bitarray types as field data
    131 self._store_metadata()

ValueError: Invalid file extension for this data type. Must be one of: dict_keys([])

System Information

--------------------------------------------------------------------------------
  Date: Mon Aug 29 09:50:27 2022 MDT

                OS : Darwin
            CPU(s) : 16
           Machine : x86_64
      Architecture : 64bit
               RAM : 64.0 GiB
       Environment : Jupyter
       File system : apfs
        GPU Vendor : ATI Technologies Inc.
      GPU Renderer : AMD Radeon Pro 5500M OpenGL Engine
       GPU Version : 4.1 ATI-4.8.13

  Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:27:05)
  [Clang 12.0.1 ]

           pyvista : 0.37.dev0
               vtk : 9.1.0
             numpy : 1.22.3
           imageio : 2.19.1
           appdirs : 1.4.4
            scooby : 0.5.12
        matplotlib : 3.5.2
         pyvistaqt : 0.9.0
             PyQt5 : 5.15.7
           IPython : 8.3.0
          colorcet : 3.0.0
           cmocean : 2.0
        ipyvtklink : 0.2.2
             scipy : 1.8.1
              tqdm : 4.64.0
            meshio : 5.3.4
        jupyterlab : 3.4.3
         pythreejs : Version unknown
--------------------------------------------------------------------------------

Screenshots

No response

@banesullivan banesullivan added the bug Uh-oh! Something isn't working as expected. label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

1 participant