payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1828","repository_url":"https://api.github.com/repos/poldracklab/fmriprep","labels_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1828/labels{/name}","comments_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1828/comments","events_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1828/events","html_url":"https://github.com/poldracklab/fmriprep/issues/1828","id":507504458,"node_id":"MDU6SXNzdWU1MDc1MDQ0NTg=","number":1828,"title":"Add failsafe version detection, to prevent CLI crash","user":{"login":"adelavega","id":2774448,"node_id":"MDQ6VXNlcjI3NzQ0NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/2774448?v=4","gravatar_id":"","url":"https://api.github.com/users/adelavega","html_url":"https://github.com/adelavega","followers_url":"https://api.github.com/users/adelavega/followers","following_url":"https://api.github.com/users/adelavega/following{/other_user}","gists_url":"https://api.github.com/users/adelavega/gists{/gist_id}","starred_url":"https://api.github.com/users/adelavega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adelavega/subscriptions","organizations_url":"https://api.github.com/users/adelavega/orgs","repos_url":"https://api.github.com/users/adelavega/repos","events_url":"https://api.github.com/users/adelavega/events{/privacy}","received_events_url":"https://api.github.com/users/adelavega/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-10-15T21:58:59Z","updated_at":"2019-10-15T21:58:59Z","closed_at":null,"author_association":"NONE","body":"When building an `fmriprep` image directly from github, the version is not set correctly, as defaults to `''`.\r\n\r\nAs a consequence the CLI crashes, because it can't parse the version:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/miniconda/bin/fmriprep\", line 10, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py\", line 312, in main\r\n    opts = get_parser().parse_args()\r\n  File \"/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py\", line 50, in get_parser\r\n    currentv = Version(__version__)\r\n  File \"/usr/local/miniconda/lib/python3.7/site-packages/packaging/version.py\", line 221, in __init__\r\n    raise InvalidVersion(\"Invalid version: '{0}'\".format(version))\r\npackaging.version.InvalidVersion: Invalid version: ''\r\n```\r\n\r\nI suggest a failsafe `unknown` version is set if the version is an empty string. "}}
other: {"actor":{"display_login":"adelavega"}}