oemof / oemof-visio

Visualisation package of oemof.
MIT License
7 stars 10 forks source link

oemof-visio changes labels of nodes to strings #9

Open tscherwath opened 2 years ago

tscherwath commented 2 years ago

Not sure if this a bug, if not please just close.

Calling class ESGGrapgRenderer is overwriting the labels of the energysystem.nodes with strings:

image

Starting in line 164:

        # draw a node for each of the energy_system's component.
        # the shape depends on the component's type.
        for nd in energy_system.nodes:
            # make sur the label is a string and not a tuple
            nd.label = str(nd.label)

best Tim

joe29k commented 4 months ago

This still seems to be an issue as I am constantly getting errors when using the graph plotting function of oemof-visio: AttributeError: property 'label' of 'Bus' object has no setter.

Just removing this "conversion" line in the code leads to at least running without errors; however, there seem to be more issues with this package.

p-snft commented 4 months ago

Honestly, oemof.visio is stale at the moment. In particular, for graph rendering, I'd suggest to use the function create_nx_graph from oemof.network.

joe29k commented 4 months ago

okay, thanks for the tip and clarification. Maybe then, some hint on the readme might be helpful for other potential users of this outdated repo?