{"action":"created","issue":{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/724","repository_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox","labels_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/724/comments","events_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/724/events","html_url":"https://github.com/neuropoly/spinalcordtoolbox/issues/724","id":131185328,"number":724,"title":"Issue related to fname_template_list being empty (no file found)","user":{"login":"jcohenadad","id":2482071,"avatar_url":"https://avatars.githubusercontent.com/u/2482071?v=3","gravatar_id":"","url":"https://api.github.com/users/jcohenadad","html_url":"https://github.com/jcohenadad","followers_url":"https://api.github.com/users/jcohenadad/followers","following_url":"https://api.github.com/users/jcohenadad/following{/other_user}","gists_url":"https://api.github.com/users/jcohenadad/gists{/gist_id}","starred_url":"https://api.github.com/users/jcohenadad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcohenadad/subscriptions","organizations_url":"https://api.github.com/users/jcohenadad/orgs","repos_url":"https://api.github.com/users/jcohenadad/repos","events_url":"https://api.github.com/users/jcohenadad/events{/privacy}","received_events_url":"https://api.github.com/users/jcohenadad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/isct_test_function","name":"isct_test_function","color":"d4c5f9"},{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/sct_register_to_template","name":"sct_register_to_template","color":"d4c5f9"},{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/testing","name":"testing","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"benjamindeleener","id":7757117,"avatar_url":"https://avatars.githubusercontent.com/u/7757117?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamindeleener","html_url":"https://github.com/benjamindeleener","followers_url":"https://api.github.com/users/benjamindeleener/followers","following_url":"https://api.github.com/users/benjamindeleener/following{/other_user}","gists_url":"https://api.github.com/users/benjamindeleener/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamindeleener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamindeleener/subscriptions","organizations_url":"https://api.github.com/users/benjamindeleener/orgs","repos_url":"https://api.github.com/users/benjamindeleener/repos","events_url":"https://api.github.com/users/benjamindeleener/events{/privacy}","received_events_url":"https://api.github.com/users/benjamindeleener/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-03T23:12:16Z","updated_at":"2016-03-02T20:02:58Z","closed_at":null,"body":"~~~\r\nisct_test_function -f sct_register_to_template -d /Volumes/data_raid/data_shared/sct_testing_small/ -p \"-i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz -l t2/labels.nii.gz\"\r\nCheck folder existence...\r\nTesting...\r\nCheck folder existence...\r\nCheck folder existence...\r\nTraceback (most recent call last):\r\nFile \"/Users/jcohen/code/spinalcordtoolbox/bin/sct_register_to_template\", line 541, in <module>\r\nmain()\r\nFile \"/Users/jcohen/code/spinalcordtoolbox/bin/sct_register_to_template\", line 192, in main\r\nfname_template = fname_template_list[0]\r\nIndexError: list index out of range\r\nCheck folder existence...\r\nCheck folder existence...\r\nTraceback (most recent call last):\r\n~~~"},"comment":{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/comments/191402899","html_url":"https://github.com/neuropoly/spinalcordtoolbox/issues/724#issuecomment-191402899","issue_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/724","id":191402899,"user":{"login":"benjamindeleener","id":7757117,"avatar_url":"https://avatars.githubusercontent.com/u/7757117?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamindeleener","html_url":"https://github.com/benjamindeleener","followers_url":"https://api.github.com/users/benjamindeleener/followers","following_url":"https://api.github.com/users/benjamindeleener/following{/other_user}","gists_url":"https://api.github.com/users/benjamindeleener/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamindeleener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamindeleener/subscriptions","organizations_url":"https://api.github.com/users/benjamindeleener/orgs","repos_url":"https://api.github.com/users/benjamindeleener/repos","events_url":"https://api.github.com/users/benjamindeleener/events{/privacy}","received_events_url":"https://api.github.com/users/benjamindeleener/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T20:02:58Z","updated_at":"2016-03-02T20:02:58Z","body":"New command, due to change of organization in testing data folder on data_shared:\r\n```\r\nisct_test_function -f sct_register_to_template -d /Volumes/data_raid/data_shared/sct_testing/small/ -p \"-i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz -l t2/labels.nii.gz\"\r\n```\r\n\r\nThe issue appeared because the path to the template in test_sct_register_to_template.py was not correctly set. I changed line 53 from\r\n```\r\ndict_param_with_path['-t'] = path_sct + '/data/template/'\r\n```\r\nto\r\n```\r\ndict_param_with_path['-t'] = path_sct + '/data/'\r\n```\r\nand it works now.\r\n\r\nNote: sct_register_to_template fails on some tests. See below the error:\r\n```\r\nCheck if data, segmentation and landmarks are in the same space...\r\nERROR: Data image and segmentation are not in the same space. Please check space and orientation of your files\r\n/Users/benjamindeleener/code/spinalcordtoolbox/bin/sct_register_to_template, line 242\r\n/Users/benjamindeleener/code/spinalcordtoolbox/scripts/sct_utils.py, line 98\r\n```"}}