Flipajs / FERDA

MIT License
1 stars 0 forks source link

graph viewer - KeyError #4

Closed Flipajs closed 7 years ago

Flipajs commented 7 years ago

Simone, prosim mrkni na to, problem vznika kdyz kliknes na vertex co naznacuje konec chunku v danem intervalu, ale ve skutecnosti to konec chunku neni a "vedou z nej 3 tecky, jako ze pokracuje".

Je potreba osetrit tento pripad v get_nodo_info fci.

KeyError: <core.region.region.Region instance at 0x13bc6c368> Traceback (most recent call last): File "/Users/flipajs/Documents/dev/ferda/gui/graph_widget/info_manager.py", line 25, in show_all_info self.show_info(item) File "/Users/flipajs/Documents/dev/ferda/gui/graph_widget/info_manager.py", line 43, in show_info item.show_info(self.loader) File "/Users/flipajs/Documents/dev/ferda/gui/graph_widget/node.py", line 52, in show_info self.create_info(loader) File "/Users/flipajs/Documents/dev/ferda/gui/graph_widget/node.py", line 66, in create_info text = loader.get_node_info(self.region) File "/Users/flipajs/Documents/dev/ferda/gui/graph_widget_loader.py", line 182, in get_node_info n = self.regions_vertices[region] KeyError: <core.region.region.Region instance at 0x13bc6c368>

Flipajs commented 7 years ago

nejlepe asi udelej fork z thesis-integration

simonmandlik commented 7 years ago

Fix je zde: https://github.com/Flipajs/FERDA/tree/graph-issue4

Problem byl v tom, ze get_node_info pouzivalo starsi datove struktury a spoustu informaci tahalo rovnou z grafu. Pokud tedy definujes nejaky range, a potrebujes useknout nejaky chunk, tak ten je v grafu reprezentovany jako jedna hrana a pouze z regionu se k nemu nelze dostat. To by ale nemelo vadit, protoze jsem presel na tu "novejsi" verzi, kdy ke grafu pristupuje pouze gm.

Zatim jsem vybral nejake vlastnosti regionu, co mi prisly uzitecne, kdyz tak se da jednoduse upravit v get_node_info v graph_loader.py