imohitmayank / jaal

Your interactive network visualizing dashboard
MIT License
321 stars 41 forks source link

The state keyword argument may not be provided without the input keyword argument #36

Closed francis-dion closed 3 years ago

francis-dion commented 3 years ago

Trying to run this on a vanilla python 3.9 project through PyCharm.

(pip) installed jall through PyCharm interface, it loaded correctly with all listed dependencies.

Copied sample code in main.py:

import

from jaal import Jaal
from jaal.datasets import load_got
# load the data
edge_df, node_df = load_got()
# init Jaal and run server
Jaal(edge_df, node_df).plot()

When running, got a bunch of warning about deprecated imports from dash, plus the following error output/error:

\venv\Scripts\python.exe /main.py Parsing the data...Done Traceback (most recent call last): File "C:\Users\fdion\PycharmProjects\pythonProject1\main.py", line 24, in Jaal(edge_df, node_df).plot() File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\jaal\jaal.py", line 343, in plot app = self.create(directed=directed, vis_opts=vis_opts) File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\jaal\jaal.py", line 272, in create @app.callback( File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\dash\dash.py", line 1011, in callback return _callback.register_callback( File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\dash\_callback.py", line 116, in register_callback ) = handle_grouped_callback_args(_args, _kwargs) File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\dash\dependencies.py", line 308, in handle_grouped_callback_args inputs_state = extract_grouped_input_state_callback_args(flat_args, kwargs) File "C:\Users\fdion\PycharmProjects\pythonProject1\venv\lib\site-packages\dash\dependencies.py", line 250, in extract_grouped_input_state_callback_args raise ValueError( ValueError: The state keyword argument may not be provided without the input keyword argument Process finished with exit code 1 I fixed the deprecated imports following the instructions in the warnings, but the "state keyword argument" issue is still there. Not sure how to proceed from here. Thanks.
imohitmayank commented 3 years ago

Thnx for sharing this issue! It was due to the changes in a major version bump of Dash package, which is a major dependency of Jaal. Plz download and try the latest version of Jaal i.e. v0.1.1, the issue should be fixed in that!