{"action":"created","issue":{"url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/34","labels_url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/34/comments","events_url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/34/events","html_url":"https://github.com/gingergeeks/pyslurm/issues/34","id":15070645,"number":34,"title":"Use of licenses (-L) makes pyslurm job.get() crashing","user":{"login":"laparn","id":1492788,"avatar_url":"https://avatars.githubusercontent.com/u/1492788?v=3","gravatar_id":"","url":"https://api.github.com/users/laparn","html_url":"https://github.com/laparn","followers_url":"https://api.github.com/users/laparn/followers","following_url":"https://api.github.com/users/laparn/following{/other_user}","gists_url":"https://api.github.com/users/laparn/gists{/gist_id}","starred_url":"https://api.github.com/users/laparn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laparn/subscriptions","organizations_url":"https://api.github.com/users/laparn/orgs","repos_url":"https://api.github.com/users/laparn/repos","events_url":"https://api.github.com/users/laparn/events{/privacy}","received_events_url":"https://api.github.com/users/laparn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-06-03T14:48:22Z","updated_at":"2015-08-10T17:36:36Z","closed_at":null,"body":"In starting the following job (after having created a license test in slurm.conf) : \r\nsrun -L test -N 1 ./wait-arg.sh 240\r\n\r\nI get the following error with pyslurm : \r\npython\r\nPython 2.7.3 (default, Apr 10 2013, 06:20:15) \r\n[GCC 4.6.3] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import pyslurm\r\n>>> job=pyslurm.job()\r\n>>> a=job.get()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"pyslurm.pyx\", line 1588, in pyslurm.pyslurm.job.get (pyslurm/pyslurm.c:20271)\r\n  File \"pyslurm.pyx\", line 1638, in pyslurm.pyslurm.job.__get (pyslurm/pyslurm.c:20709)\r\n  File \"pyslurm.pyx\", line 3670, in pyslurm.pyslurm.__get_licenses (pyslurm/pyslurm.c:41420)\r\nValueError: need more than 1 value to unpack\r\n\r\nThis occured both on Ubuntu 12.04 (slurm 2.5.0) and on centos 6.3 (slurm 2.5.something) with pyslurm compiled from the trunk.\r\n\r\nIf I add in pyslurm.pyx, the following line : \r\nprint((\"debug __get_licenses %s\",alist[i]))\r\non line 3669 of pyslurm.pyx, then I have the resulting output  : \r\narnaud@D3550:/usr/local$ python\r\nPython 2.7.3 (default, Apr 10 2013, 06:20:15) \r\n[GCC 4.6.3] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import sys\r\n>>> sys.path.append(\"/usr/local/lib/python2.7/dist-packages/pyslurm-2.5.6_1\")\r\n>>> import pyslurm\r\n>>> a=pyslurm.job()\r\n>>> b=a.get()\r\n('debug __get_licenses %s', 'test')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"pyslurm.pyx\", line 1588, in pyslurm.pyslurm.job.get (pyslurm/pyslurm.c:20273)\r\n  File \"pyslurm.pyx\", line 1638, in pyslurm.pyslurm.job.__get (pyslurm/pyslurm.c:20711)\r\n  File \"pyslurm.pyx\", line 3670, in pyslurm.pyslurm.__get_licenses (pyslurm/pyslurm.c:41430)\r\nValueError: need more than 1 value to unpack\r\n\r\nSo we see that pyslurm waits for a string formatted as xxxx*number . And in my configuration file, I have : Licenses=test*2,test2\r\nso at least the test*2 should be ok. So it is the reading of this string that is buggy.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/comments/129543458","html_url":"https://github.com/gingergeeks/pyslurm/issues/34#issuecomment-129543458","issue_url":"https://api.github.com/repos/gingergeeks/pyslurm/issues/34","id":129543458,"user":{"login":"gingergeeks","id":1034105,"avatar_url":"https://avatars.githubusercontent.com/u/1034105?v=3","gravatar_id":"","url":"https://api.github.com/users/gingergeeks","html_url":"https://github.com/gingergeeks","followers_url":"https://api.github.com/users/gingergeeks/followers","following_url":"https://api.github.com/users/gingergeeks/following{/other_user}","gists_url":"https://api.github.com/users/gingergeeks/gists{/gist_id}","starred_url":"https://api.github.com/users/gingergeeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gingergeeks/subscriptions","organizations_url":"https://api.github.com/users/gingergeeks/orgs","repos_url":"https://api.github.com/users/gingergeeks/repos","events_url":"https://api.github.com/users/gingergeeks/events{/privacy}","received_events_url":"https://api.github.com/users/gingergeeks/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T17:36:36Z","updated_at":"2015-08-10T17:36:36Z","body":"Hmm, works for my test case. Can you send the appropriate output line from Slurm for the job ? "}}