humlab / penelope

Pipleline for generating data used in text analytics notebooks. Used by Welfare State Analytics, INIDUN and several other research projects.
5 stars 1 forks source link

[BUG] Exception is raised when using Gephi output format #162

Closed roger-mahler closed 2 years ago

roger-mahler commented 2 years ago
        # FIXME [BUG] Exception is raised when using Gephi output format

https://github.com/humlab/penelope/blob/da3ce5380bab4d4812e20382dd5c6337fd5aad81/penelope/notebook/topic_modelling/topics_token_network_gui.py#L328

... i VISUALIZE Topic-Token Network – i gephi-output.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
File /venv/lib/python3.9/site-packages/ipywidgets/widgets/widget_output.py:103, in Output.capture.<locals>.capture_decorator.<locals>.inner(*args, **kwargs)
    101     self.clear_output(*clear_args, **clear_kwargs)
    102 with self:
--> 103     return func(*args, **kwargs)

File /venv/lib/python3.9/site-packages/penelope/notebook/topic_modelling/topics_token_network_gui.py:334, in default_displayer(opts)
    331     topics_tokens.columns = ['Source', 'Target', 'Weight']
    333 if opts.output_format != "table":
--> 334     utility.ts_store(data=topics_tokens, extension=opts.output_format.lower(), basename='topics_token_network')
    336 g = gu.table_widget(topics_tokens)
    337 display(g)

File /venv/lib/python3.9/site-packages/penelope/utility/pandas_utils.py:492, in ts_store(data, extension, basename)
    490     filename = "clipboard"
    491 else:
--> 492     raise ValueError(f"unknown extension: {extension}")
    493 logger.info(f'Data stored in {filename}')

ValueError: unknown extension: gephi