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

[Bug ]demo usage-image-export.py results in Invalid argument error #215

Open
bfr42 opened this issue Apr 12, 2024 · 1 comment
Open

[Bug ]demo usage-image-export.py results in Invalid argument error #215

bfr42 opened this issue Apr 12, 2024 · 1 comment

Comments

@bfr42
Copy link

bfr42 commented Apr 12, 2024

Description

I downloaded github.com/plotly/dash-cytoscape/blob/main/demos/usage-image-export.py and executed it using python 3.12.3. It normally starts, but in the browser I get the bellow error. Tested with Chrome, Firefox, Edge browser under Windows. I would like to use the export in my own Dash Cytoscape application.

Invalid argument `generateImage.type` passed into Cytoscape with ID "cytoscape".
Expected one of ["svg","png","jpg","jpeg"].


(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
Error: Invalid argument `generateImage.type` passed into Cytoscape with ID "cytoscape".

Expected one of ["svg","png","jpg","jpeg"].

    at propTypeErrorHandler (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_16_1m1712603851.dev.js:8118:9)

    at CheckedComponent (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_16_1m1712603851.dev.js:3729:70)

    at renderWithHooks (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:14938:20)

    at updateFunctionComponent (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:17169:22)

    at beginWork (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:18745:18)

    at HTMLUnknownElement.callCallback (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:182:16)

    at Object.invokeGuardedCallbackDev (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:231:18)

    at invokeGuardedCallback (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:286:33)

    at beginWork$1 (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:23338:9)

    at performUnitOfWork (http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_16_1m1712603851.14.0.js:22292:14)

Steps/Code to Reproduce

python github.com/plotly/dash-cytoscape/blob/main/demos/usage-image-export.py

Versions

Dash 2.16.1
Dash Cytoscape 1.0.0

@FredBill1
Copy link

Adding a value=None, here seems to fix it.

dcc.Tabs(
id="tabs",
children=[
dcc.Tab(label="generate jpg", value="jpg"),
dcc.Tab(label="generate png", value="png"),
],
),

dcc.Tabs( 
    id="tabs", 
    children=[ 
        dcc.Tab(label="generate jpg", value="jpg"), 
        dcc.Tab(label="generate png", value="png"), 
    ], 
    value=None,
),

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

No branches or pull requests

2 participants