def usufyToGmlExport(d, fPath):
    """
    Workaround to export data to a .gml file.

    Args:
    -----
        d: Data to export.
        fPath: File path for the output file.
    """
    # Reading the previous gml file
    try:
        oldData=nx.read_gml(fPath)
    except UnicodeDecodeError as e:
        print("UnicodeDecodeError:\t" + str(e))
        print("Something went wrong when reading the .gml file relating to the decoding of UNICODE.")
        import time as time
        fPath+="_" +str(time.time())
        print("To avoid losing data, the output file will be renamed to use the timestamp as:\n" + fPath + "_" + str(time.time()))
        print()
        # No information has been recovered
        oldData = nx.Graph()
    except Exception as e:
        # No information has been recovered
        oldData = nx.Graph()

    newGraph = _generateGraphData(d, oldData)

    # Writing the gml file
    nx.write_gml(newGraph,fPath)
def usufyToGmlExport ( d , fPath ) : try : oldData = nx . read_gml ( fPath ) except UnicodeDecodeError as e : print ( "UnicodeDecodeError:\t" + str ( e ) ) print ( "Something went wrong when reading the .gml file relating to the decoding of UNICODE." ) import time as time fPath += "_" + str ( time . time ( ) ) print ( "To avoid losing data, the output file will be renamed to use the timestamp as:\n" + fPath + "_" + str ( time . time ( ) ) ) print ( ) oldData = nx . Graph ( ) except Exception as e : oldData = nx . Graph ( ) newGraph = _generateGraphData ( d , oldData ) nx . write_gml ( newGraph , fPath )
Workaround to export data to a .gml file.

    Args:
    -----
        d: Data to export.
        fPath: File path for the output file.