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

Errors when running app #11

Open
tyronzn opened this issue Mar 28, 2024 · 0 comments
Open

Errors when running app #11

tyronzn opened this issue Mar 28, 2024 · 0 comments

Comments

@tyronzn
Copy link

tyronzn commented Mar 28, 2024

I've tried running the app but get errors below when it tries to return information

TypeError: Passing a set as an indexer is not supported. Use a list instead.
Traceback:
File "/root/anaconda3/envs/ftth_planner/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.dict)
File "/root/ftth_planner/ftth_app.py", line 140, in
detailed_cost, fig = get_fiber_planning(trench_network, building_gdf, g_box )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ftth_planner/ftth_app.py", line 63, in get_fiber_planning
fiber_network, ref_fig = get_fiber_network(ref_trench_network, cost_parameters, ref_building_gdf, ref_g_box)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ftth_planner/fibers.py", line 221, in get_fiber_network
fiber_network, building_fiber_graph, trenches_gdf = _get_drop_cable_network(building_trenches_with_cabinet_df,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ftth_planner/fibers.py", line 420, in _get_drop_cable_network
building_drop_cables, trenches_gdf = _find_shortest_path_to_buildings(cabinet_look_up, g_box,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ftth_planner/fibers.py", line 526, in _find_shortest_path_to_buildings
trenches_gdf.loc[pd.IndexSlice[set(pairs)]]["dig_weight"] = 0.0
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/ftth_planner/lib/python3.12/site-packages/pandas/core/indexing.py", line 1178, in getitem
check_dict_or_set_indexers(key)
File "/root/anaconda3/envs/ftth_planner/lib/python3.12/site-packages/pandas/core/indexing.py", line 2774, in check_dict_or_set_indexers
raise TypeError(

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

1 participant