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

GeometryRepresentation.py appears to be incorrect #74

Open
justaPCWingo opened this issue Jan 2, 2024 · 0 comments · May be fixed by #75
Open

GeometryRepresentation.py appears to be incorrect #74

justaPCWingo opened this issue Jan 2, 2024 · 0 comments · May be fixed by #75

Comments

@justaPCWingo
Copy link

Description

It appears that the current copy of GeometryRepresentation.py is missing some of the traits specified in GeometryRepresentation.react.js; specifically showScalarBar and scalarBarTitle. Manually adding these fields to self._prop_names and self.available_properties in GeometryRepresentation.py fixes the issue, which suggests that for whatever reason the auto-generated GeometryRepresentation.py file is out of date.

Steps/Code to Reproduce

Copy and run usage.py with the dash package versions specified in the Versions section below.

Expected Results

VTK example with color bar and colorbar title should appear

Actual Results

Without manual fix:

Traceback (most recent call last):
  File "C:\Users\wingop\dev_workspace\python\vtk_colorbar_test\usage.py", line 41, in <module>
    dash_vtk.GeometryRepresentation(
  File "C:\Users\wingop\.conda\envs\dash\Lib\site-packages\dash\development\base_component.py", line 420, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\wingop\.conda\envs\dash\Lib\site-packages\dash_vtk\GeometryRepresentation.py", line 61, in __init__
    super(GeometryRepresentation, self).__init__(children=children, **args)
  File "C:\Users\wingop\.conda\envs\dash\Lib\site-packages\dash\development\base_component.py", line 138, in __init__
    raise TypeError(
TypeError: The `dash_vtk.GeometryRepresentation` component (version 0.0.9) with the ID "rep" received an unexpected keyword argument: `scalarBarTitle`
Allowed arguments: actor, children, colorDataRange, colorMapPreset, cubeAxesStyle, id, mapper, property, showCubeAxes

With manual fix:
Demo renders as expected

Versions

Dash 2.14.2
Dash Core Components 2.0.15
Dash HTML Components 2.12.1
Dash VTK 0.0.9

@justaPCWingo justaPCWingo linked a pull request Jan 20, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant