{"action":"created","issue":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/636","labels_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/636/comments","events_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/636/events","html_url":"https://github.com/Hammerspoon/hammerspoon/issues/636","id":116838886,"number":636,"title":"hs.image:setImageFromPath() doesn't work","user":{"login":"chdiza","id":3311113,"avatar_url":"https://avatars.githubusercontent.com/u/3311113?v=3","gravatar_id":"","url":"https://api.github.com/users/chdiza","html_url":"https://github.com/chdiza","followers_url":"https://api.github.com/users/chdiza/followers","following_url":"https://api.github.com/users/chdiza/following{/other_user}","gists_url":"https://api.github.com/users/chdiza/gists{/gist_id}","starred_url":"https://api.github.com/users/chdiza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chdiza/subscriptions","organizations_url":"https://api.github.com/users/chdiza/orgs","repos_url":"https://api.github.com/users/chdiza/repos","events_url":"https://api.github.com/users/chdiza/events{/privacy}","received_events_url":"https://api.github.com/users/chdiza/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-13T19:45:36Z","updated_at":"2015-11-13T20:42:15Z","closed_at":"2015-11-13T20:08:10Z","body":"Put this in your init, where string1 and string2 are paths to two different jpegs on your machine.\r\n```lua\r\nfoo = hs.drawing.image(hs.geometry.rect(1000,200,100,100),  string1 )\r\nfoo:show()\r\nfoo:setImageFromPath(string2)\r\n```\r\nExpected behavior: HS changes the image displayed by the drawing object foo into the image living at string2.  I expect this because of [the docs](http://www.hammerspoon.org/docs/hs.drawing.html#setImageFromPath).\r\n\r\nActual behavior: The console appears and says `attempt to call a nil value (method 'setImageFromPath')`.\r\n\r\nUnless I'm confused here, either the docs are wrong or there is a bug in hs.drawing."},"comment":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/comments/156550837","html_url":"https://github.com/Hammerspoon/hammerspoon/issues/636#issuecomment-156550837","issue_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/636","id":156550837,"user":{"login":"cmsj","id":353427,"avatar_url":"https://avatars.githubusercontent.com/u/353427?v=3","gravatar_id":"","url":"https://api.github.com/users/cmsj","html_url":"https://github.com/cmsj","followers_url":"https://api.github.com/users/cmsj/followers","following_url":"https://api.github.com/users/cmsj/following{/other_user}","gists_url":"https://api.github.com/users/cmsj/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsj/subscriptions","organizations_url":"https://api.github.com/users/cmsj/orgs","repos_url":"https://api.github.com/users/cmsj/repos","events_url":"https://api.github.com/users/cmsj/events{/privacy}","received_events_url":"https://api.github.com/users/cmsj/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T20:42:15Z","updated_at":"2015-11-13T20:42:15Z","body":"@chdiza is there anything in the system log? (i.e. in Console.app)\r\n\r\nI tested locally with the two image files that happen to live in my .hammerspoon/ folder (albeit they're PDFs, but they load as images) and it worked fine"}}