{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/7446","labels_url":"https://api.github.com/repos/ipython/ipython/issues/7446/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/7446/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/7446/events","html_url":"https://github.com/ipython/ipython/pull/7446","id":54282129,"number":7446,"title":"Set name/date for served notebooks","user":{"login":"bollwyvl","id":45380,"avatar_url":"https://avatars.githubusercontent.com/u/45380?v=3","gravatar_id":"","url":"https://api.github.com/users/bollwyvl","html_url":"https://github.com/bollwyvl","followers_url":"https://api.github.com/users/bollwyvl/followers","following_url":"https://api.github.com/users/bollwyvl/following{/other_user}","gists_url":"https://api.github.com/users/bollwyvl/gists{/gist_id}","starred_url":"https://api.github.com/users/bollwyvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollwyvl/subscriptions","organizations_url":"https://api.github.com/users/bollwyvl/orgs","repos_url":"https://api.github.com/users/bollwyvl/repos","events_url":"https://api.github.com/users/bollwyvl/events{/privacy}","received_events_url":"https://api.github.com/users/bollwyvl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T04:11:05Z","updated_at":"2015-01-14T20:00:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/ipython/pulls/7446","html_url":"https://github.com/ipython/ipython/pull/7446","diff_url":"https://github.com/ipython/ipython/pull/7446.diff","patch_url":"https://github.com/ipython/ipython/pull/7446.patch"},"body":"This fixes #7360 by explicitly providing `resources` when calling `from_notebook_node` in the nbconvert handlers. It sets the name and modified date in `metadata`, but none of the other stuff which didn't seem relevant in this case:\r\n```python\r\n{\r\n\"unique_key\": \"Stuff\",\r\n\"output_files_dir\": \"Stuff_files\",\r\n\"metadata\": defaultdict(None, {\"name\": \"Stuff\", \"modified_date\": \"January 13, 2015\"}),\r\n\"profile_dir\": \"/home/weg/.ipython/profile_default\"\r\n} \r\n```\r\n\r\nThis is normally populated by `from_filename`, but calling that didn't seem appropriate for a `model` coming off the contents manager.\r\n\r\nAlso uncovered a mis-construction of `ResourcesDict` (a subclass of `defaultdict`), using the pattern found immediately above... was getting the ever-helpful `first argument must be callable` error, as it should be the default value for missing. Another option would be to change the constructor to be like `dict`, but this seemed less surprising."},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/69981111","html_url":"https://github.com/ipython/ipython/pull/7446#issuecomment-69981111","issue_url":"https://api.github.com/repos/ipython/ipython/issues/7446","id":69981111,"user":{"login":"damianavila","id":1640669,"avatar_url":"https://avatars.githubusercontent.com/u/1640669?v=3","gravatar_id":"","url":"https://api.github.com/users/damianavila","html_url":"https://github.com/damianavila","followers_url":"https://api.github.com/users/damianavila/followers","following_url":"https://api.github.com/users/damianavila/following{/other_user}","gists_url":"https://api.github.com/users/damianavila/gists{/gist_id}","starred_url":"https://api.github.com/users/damianavila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianavila/subscriptions","organizations_url":"https://api.github.com/users/damianavila/orgs","repos_url":"https://api.github.com/users/damianavila/repos","events_url":"https://api.github.com/users/damianavila/events{/privacy}","received_events_url":"https://api.github.com/users/damianavila/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T20:00:39Z","updated_at":"2015-01-14T20:00:39Z","body":":+1: "}}