Skip to content

ValueError: invalid literal for float():  #2

@Onnene

Description

@Onnene

Hi, when I run the scripts_chicago.py code with the required inputs ('ChicagoSketch_net.txt', 'ChicagoSketch_node.txt', and 'ChicagoSketch_trips.txt' files) as stated in the Readme, the following CSV(s) are generated Chicago_od.csv and Chicago_net.csv but none is generated for the node file ie Chicago_node.csv. Then I get the error below. Please, how can I fix this?

ERROR

Traceback (most recent call last):
  File "C:/Users/.../scripts_chicago.py", line 257, in <module>
    main()
  File "C:/Users/.../scripts_chicago.py", line 239, in main
    process_chicago_network()
  File "C:/Users/.../scripts_chicago.py", line 26, in process_chicago_network
    process_node(input, output, min_X, max_X, min_Y, max_Y)
  File "C:\Users\...\python-traffic-assignment\process_data.py", line 146, in process_node
    nodes = np.loadtxt(input, delimiter=',', skiprows=1)
  File "C:\Users\...\numpy\lib\npyio.py", line 986, in loadtxt
    items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "C:\Users\...\numpy\lib\npyio.py", line 688, in floatconv
    return float(x)
ValueError: invalid literal for float(): 1	690309	1976022	;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions