{"action":"created","issue":{"url":"https://api.github.com/repos/ilogue/niprov/issues/98","repository_url":"https://api.github.com/repos/ilogue/niprov","labels_url":"https://api.github.com/repos/ilogue/niprov/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/ilogue/niprov/issues/98/comments","events_url":"https://api.github.com/repos/ilogue/niprov/issues/98/events","html_url":"https://github.com/ilogue/niprov/issues/98","id":132289290,"number":98,"title":"Some files end up without ID in database. ","user":{"login":"ilogue","id":1508492,"avatar_url":"https://avatars.githubusercontent.com/u/1508492?v=3","gravatar_id":"","url":"https://api.github.com/users/ilogue","html_url":"https://github.com/ilogue","followers_url":"https://api.github.com/users/ilogue/followers","following_url":"https://api.github.com/users/ilogue/following{/other_user}","gists_url":"https://api.github.com/users/ilogue/gists{/gist_id}","starred_url":"https://api.github.com/users/ilogue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilogue/subscriptions","organizations_url":"https://api.github.com/users/ilogue/orgs","repos_url":"https://api.github.com/users/ilogue/repos","events_url":"https://api.github.com/users/ilogue/events{/privacy}","received_events_url":"https://api.github.com/users/ilogue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ilogue/niprov/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ilogue/niprov/labels/minor","name":"minor","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-08T23:40:15Z","updated_at":"2016-02-08T23:45:35Z","closed_at":null,"body":"```\r\nERROR:waitress:Exception when serving /id/None/pipeline\r\nTraceback (most recent call last):\r\n  File \"/home/jasperb/Projects/pylabs/waitress-0.8.10-py2.7.egg/waitress/channel.py\", line 336, in service\r\n    task.service()\r\n  File \"/home/jasperb/Projects/pylabs/waitress-0.8.10-py2.7.egg/waitress/task.py\", line 169, in service\r\n    self.execute()\r\n  File \"/home/jasperb/Projects/pylabs/waitress-0.8.10-py2.7.egg/waitress/task.py\", line 388, in execute\r\n    app_iter = self.channel.server.application(env, start_response)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/router.py\", line 242, in __call__\r\n    response = self.invoke_subrequest(request, use_tweens=True)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/router.py\", line 217, in invoke_subrequest\r\n    response = handle_request(request)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/tweens.py\", line 21, in excview_tween\r\n    response = handler(request)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/router.py\", line 163, in handle_request\r\n    response = view_callable(context, request)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/config/views.py\", line 355, in rendered_view\r\n    result = view(context, request)\r\n  File \"/home/jasperb/Projects/pylabs/env/local/lib/python2.7/site-packages/pyramid/config/views.py\", line 501, in _requestonly_view\r\n    response = view(request)\r\n  File \"/home/jasperb/Projects/niprov/niprov/views.py\", line 43, in pipeline\r\n    return {'pipeline':pipeline.forFile(files.byId(sid)), 'sid':sid}\r\n  File \"/home/jasperb/Projects/niprov/niprov/mongo.py\", line 145, in byId\r\n    return self.factory.fromProvenance(record)\r\n  File \"/home/jasperb/Projects/niprov/niprov/files.py\", line 60, in fromProvenance\r\n    return self.locatedAt(provenance['location'], provenance)\r\nTypeError: 'NoneType' object has no attribute '__getitem__'\r\n\r\n```\r\n\r\ni.e. http://0.0.0.0:6543/location/nara/mnt/ALAYA/data/ilabs/shiva/meg/shiva_4082/sss_pca_fif/shiva_4082_a_allclean_fil40_raw_sss.fif"},"comment":{"url":"https://api.github.com/repos/ilogue/niprov/issues/comments/181627294","html_url":"https://github.com/ilogue/niprov/issues/98#issuecomment-181627294","issue_url":"https://api.github.com/repos/ilogue/niprov/issues/98","id":181627294,"user":{"login":"ilogue","id":1508492,"avatar_url":"https://avatars.githubusercontent.com/u/1508492?v=3","gravatar_id":"","url":"https://api.github.com/users/ilogue","html_url":"https://github.com/ilogue","followers_url":"https://api.github.com/users/ilogue/followers","following_url":"https://api.github.com/users/ilogue/following{/other_user}","gists_url":"https://api.github.com/users/ilogue/gists{/gist_id}","starred_url":"https://api.github.com/users/ilogue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilogue/subscriptions","organizations_url":"https://api.github.com/users/ilogue/orgs","repos_url":"https://api.github.com/users/ilogue/repos","events_url":"https://api.github.com/users/ilogue/events{/privacy}","received_events_url":"https://api.github.com/users/ilogue/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T23:45:35Z","updated_at":"2016-02-08T23:45:35Z","body":"Might happen here:\r\n\r\nhttps://github.com/ilogue/niprov/blob/master/niprov/files.py#L55\r\n\r\nFileFactory detects that library is missing and therefore uses the Basefile constructor but forgets to pass provenance. "}}