{"action":"closed","issue":{"url":"https://api.github.com/repos/marl/jams/issues/37","labels_url":"https://api.github.com/repos/marl/jams/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/marl/jams/issues/37/comments","events_url":"https://api.github.com/repos/marl/jams/issues/37/events","html_url":"https://github.com/marl/jams/issues/37","id":86025023,"number":37,"title":"import_lab crashes","user":{"login":"urinieto","id":3695281,"avatar_url":"https://avatars.githubusercontent.com/u/3695281?v=3","gravatar_id":"","url":"https://api.github.com/users/urinieto","html_url":"https://github.com/urinieto","followers_url":"https://api.github.com/users/urinieto/followers","following_url":"https://api.github.com/users/urinieto/following{/other_user}","gists_url":"https://api.github.com/users/urinieto/gists{/gist_id}","starred_url":"https://api.github.com/users/urinieto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urinieto/subscriptions","organizations_url":"https://api.github.com/users/urinieto/orgs","repos_url":"https://api.github.com/users/urinieto/repos","events_url":"https://api.github.com/users/urinieto/events{/privacy}","received_events_url":"https://api.github.com/users/urinieto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marl/jams/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/marl/jams/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-08T04:50:30Z","updated_at":"2015-06-17T20:05:59Z","closed_at":"2015-06-17T20:05:59Z","body":"`import_lab` crashes when it tries to parse something like:\r\n\r\n```\r\n0.432471655\tNew Point\r\n0.873650793\tNew Point\r\n1.358004535\t1\r\n1.822993197\t2\r\n2.287006802\t3\r\n2.740000000\t4\r\n```\r\n(this example is copied from the Isophonics beat annotations for the track When I Get Home, from the album A Hard Day's Night, by The Beatles)\r\n\r\nPandas complains about not getting a float, but a string:\r\n```\r\n  File \"./isophonics_parser.py\", line 183, in <module>\r\n    process(args.in_dir, args.out_dir)\r\n  File \"./isophonics_parser.py\", line 128, in process\r\n    jam=jam)\r\n  File \"/home/uri/Projects/jams/jams/util.py\", line 81, in import_lab\r\n    data.loc[:, 1] -= data[0]\r\n  File \"/usr/local/lib/python2.7/dist-packages/pandas/core/ops.py\", line 182, in f\r\n    result = method(self, other)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pandas/core/ops.py\", line 524, in wrapper\r\n    arr = na_op(lvalues, rvalues)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pandas/core/ops.py\", line 475, in na_op\r\n    result[mask] = op(x[mask], _values_from_object(y[mask]))\r\nTypeError: unsupported operand type(s) for -: 'str' and 'float'\r\n```\r\n\r\nShould we default to 0 when a char/string is found in the last column?"}}