{"action":"created","issue":{"url":"https://api.github.com/repos/qtop/qtop/issues/158","repository_url":"https://api.github.com/repos/qtop/qtop","labels_url":"https://api.github.com/repos/qtop/qtop/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/qtop/qtop/issues/158/comments","events_url":"https://api.github.com/repos/qtop/qtop/issues/158/events","html_url":"https://github.com/qtop/qtop/issues/158","id":136808312,"number":158,"title":"Crash (something wrong with your sorting lambda)","user":{"login":"mightybigcar","id":4315540,"avatar_url":"https://avatars.githubusercontent.com/u/4315540?v=3","gravatar_id":"","url":"https://api.github.com/users/mightybigcar","html_url":"https://github.com/mightybigcar","followers_url":"https://api.github.com/users/mightybigcar/followers","following_url":"https://api.github.com/users/mightybigcar/following{/other_user}","gists_url":"https://api.github.com/users/mightybigcar/gists{/gist_id}","starred_url":"https://api.github.com/users/mightybigcar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightybigcar/subscriptions","organizations_url":"https://api.github.com/users/mightybigcar/orgs","repos_url":"https://api.github.com/users/mightybigcar/repos","events_url":"https://api.github.com/users/mightybigcar/events{/privacy}","received_events_url":"https://api.github.com/users/mightybigcar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-26T20:36:56Z","updated_at":"2016-02-26T22:21:18Z","closed_at":null,"body":"On a fresh clone, I get the following crash:\r\n```\r\n[cheiny@bora qtop]$ ./qtop.py -a\r\nCRITICAL - There's (probably) something wrong in your sorting lambda in qtopconf.yaml.\r\nERROR - Uncaught exception\r\nTraceback (most recent call last):\r\n  File \"./qtop.py\", line 1798, in <module>\r\n    cluster = calculate_cluster(worker_nodes, cluster)\r\n  File \"./qtop.py\", line 173, in calculate_cluster\r\n    options.REMAP)\r\n  File \"./qtop.py\", line 911, in map_worker_nodes_to_wn_dict\r\n    sort_worker_nodes(worker_nodes)\r\n  File \"./qtop.py\", line 788, in sort_worker_nodes\r\n    batch_nodes.sort(key=eval(config['sorting']['user_sort']), reverse=config['sorting']['reverse'])\r\n  File \"<string>\", line 5, in <lambda>\r\nValueError: invalid literal for int() with base 10: ''\r\n[cheiny@bora qtop]$\r\n```\r\n\r\nWe're running OGS 2011.11.p1 on Fedora 20.  Node names are definitely not a pure arithmetic sequence - they're named after beers (for example: lager, porter, marzen) or cars (for example: bora, jaguar).\r\n\r\nLet me know if there's any other information I can provide."},"comment":{"url":"https://api.github.com/repos/qtop/qtop/issues/comments/189506630","html_url":"https://github.com/qtop/qtop/issues/158#issuecomment-189506630","issue_url":"https://api.github.com/repos/qtop/qtop/issues/158","id":189506630,"user":{"login":"mightybigcar","id":4315540,"avatar_url":"https://avatars.githubusercontent.com/u/4315540?v=3","gravatar_id":"","url":"https://api.github.com/users/mightybigcar","html_url":"https://github.com/mightybigcar","followers_url":"https://api.github.com/users/mightybigcar/followers","following_url":"https://api.github.com/users/mightybigcar/following{/other_user}","gists_url":"https://api.github.com/users/mightybigcar/gists{/gist_id}","starred_url":"https://api.github.com/users/mightybigcar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightybigcar/subscriptions","organizations_url":"https://api.github.com/users/mightybigcar/orgs","repos_url":"https://api.github.com/users/mightybigcar/repos","events_url":"https://api.github.com/users/mightybigcar/events{/privacy}","received_events_url":"https://api.github.com/users/mightybigcar/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T22:21:18Z","updated_at":"2016-02-26T22:21:18Z","body":"> could you try with no sorting?\r\n\r\nStill barfs, but with a different stack trace.\r\n\r\n```\r\n[cheiny@bora qtop]$ ./qtop.py -a\r\nERROR - Uncaught exception\r\nTraceback (most recent call last):\r\n  File \"./qtop.py\", line 1772, in <module>\r\n    config = load_yaml_config()\r\n  File \"./qtop.py\", line 689, in load_yaml_config\r\n    config = read_yaml_natively(os.path.join(realpath(QTOPPATH), QTOPCONF_YAML))\r\n  File \"/mnt/venom/cheiny/tools/qtop/yaml_parser.py\", line 109, in read_yaml_natively\r\n    block, line = read_yaml_config_block(line, fin, get_lines)\r\n  File \"/mnt/venom/cheiny/tools/qtop/yaml_parser.py\", line 141, in read_yaml_config_block\r\n    or (line[0] == 1 and (key_value.keys()[0] == '-'))\\\r\nUnboundLocalError: local variable 'key_value' referenced before assignment\r\n[cheiny@bora qtop]$\r\n```\r\n"}}