Skip to content

ValueError: could not convert string to float:  #2

@PatMyron

Description

@PatMyron
Traceback (most recent call last):
  File "/home/patmy/shell-profiler/profile", line 74, in <module>
    profiling_with_timings = map(collect_timings, tokenized_trace, range(len(tokenized_trace)))
  File "/home/patmy/shell-profiler/profile", line 31, in collect_timings
    timing = float(tokenized_trace[index+1][1]) - float(tokens[1]) 
ValueError: could not convert string to float: 

tokenized_trace[index+1] is ['Usage', '\n', '']
tokenized_trace[index+1][1] is a string consisting of solely a new line character


$ bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
$ python --version
Python 2.7.12


$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.
$ python --version
Python 2.7.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions