airscholar / AlphaTeam

Complex Network Analysis Using Machine Learning
5 stars 5 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 [single metrics, Directed_toggle, crypto FF] #88

Closed tejas2292 closed 1 year ago

tejas2292 commented 1 year ago

Traceback (most recent call last): File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2551, in call return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2531, in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2528, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application\routes\centrality_routes.py", line 160, in centrality_degree df, graph_name1 = plot_metric(networkGraphs, metrics, directed=directed_toggle, multi=multi_toggle, dynamic=dynamic_toggle, layout=layout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application..\src\utils.py", line 22, in wrapper result = func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application..\src\visualisation.py", line 167, in plot_metric generate_staticmetric(networkGraphs, df, filepath, layout=layout) File "E:\Cranfield\Group Project\AlphaTeam\application..\src\visualisation_src\metrics_visualisation.py", line 40, in generate_static_metric node_info += f"{metrics_name}: {str(metric_df[metrics_name].values[0])}
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: index 0 is out of bounds for axis 0 with size 0 127.0.0.1 - - [27/Mar/2023 15:44:11] "GET /centrality/degree?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:11] "GET /centrality/degree?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:11] "GET /centrality/degree?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:11] "GET /centrality/degree?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:23] "GET /favicon.ico HTTP/1.1" 200 - CACHE: Using cache for get_networkGraph, hash: ff0d319dceb974256b366be5a5b5e9bd CACHE: Using cache for plot_metric, hash: bb19fe517962a7e666f6fd1f517b7614 127.0.0.1 - - [27/Mar/2023 15:44:25] "POST /centrality/degree HTTP/1.1" 200 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/css/styles2.css HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/js/base_script.js HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/uploads/CRYPTO1679928165/degree_centrality_Directed_Mutli_Static_sfdp.html HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/uploads/CRYPTO1679928165/degree_centrality_Directed_Mutli_Histogram.html HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/uploads/CRYPTO1679928165/degree_centrality_Directed_Mutli_Boxplot.html HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:25] "GET /static/uploads/CRYPTO1679928165/degree_centrality_Directed_Mutli_Violin.html HTTP/1.1" 304 - 127.0.0.1 - - [27/Mar/2023 15:44:26] "GET /favicon.ico HTTP/1.1" 200 - CACHE: Using cache for get_networkGraph, hash: ff0d319dceb974256b366be5a5b5e9bd CACHE: Computing value for plot_metric, hash: e3d9b66f6fef116dc7bc8bfe16495122 CACHE: Using cache for compute_degree_centrality, hash: 6b7e037c3a4b8eb6be1c6d3ef1a7b18a 127.0.0.1 - - [27/Mar/2023 15:44:27] "POST /centrality/degree HTTP/1.1" 500 - Traceback (most recent call last): File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2551, in call return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2531, in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 2528, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\venv\Lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(
view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application\routes\centrality_routes.py", line 160, in centrality_degree df, graph_name1 = plot_metric(networkGraphs, metrics, directed=directed_toggle, multi=multi_toggle, dynamic=dynamic_toggle, layout=layout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application..\src\utils.py", line 22, in wrapper result = func(
args,
kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\Cranfield\Group Project\AlphaTeam\application..\src\visualisation.py", line 165, in plot_metric generate_dynamic_metric(networkGraphs, df, filepath) File "E:\Cranfield\Group Project\AlphaTeam\application..\src\visualisation_src\metrics_visualisation.py", line 137, in generate_dynamic_metric c = cmap(metric_df['std'].values[0]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: index 0 is out of bounds for axis 0 with size 0

tejas2292 commented 1 year ago

working