{"action":"created","issue":{"url":"https://api.github.com/repos/altair-viz/altair/issues/649","repository_url":"https://api.github.com/repos/altair-viz/altair","labels_url":"https://api.github.com/repos/altair-viz/altair/issues/649/labels{/name}","comments_url":"https://api.github.com/repos/altair-viz/altair/issues/649/comments","events_url":"https://api.github.com/repos/altair-viz/altair/issues/649/events","html_url":"https://github.com/altair-viz/altair/issues/649","id":308314080,"number":649,"title":"save PNG/SVG in Windows","user":{"login":"pagpires","id":7856031,"avatar_url":"https://avatars2.githubusercontent.com/u/7856031?v=4","gravatar_id":"","url":"https://api.github.com/users/pagpires","html_url":"https://github.com/pagpires","followers_url":"https://api.github.com/users/pagpires/followers","following_url":"https://api.github.com/users/pagpires/following{/other_user}","gists_url":"https://api.github.com/users/pagpires/gists{/gist_id}","starred_url":"https://api.github.com/users/pagpires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pagpires/subscriptions","organizations_url":"https://api.github.com/users/pagpires/orgs","repos_url":"https://api.github.com/users/pagpires/repos","events_url":"https://api.github.com/users/pagpires/events{/privacy}","received_events_url":"https://api.github.com/users/pagpires/received_events","type":"User","site_admin":false},"labels":[{"id":262356186,"url":"https://api.github.com/repos/altair-viz/altair/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-03-25T01:36:16Z","updated_at":"2018-03-26T04:25:46Z","closed_at":null,"author_association":"NONE","body":"I encountered a problem saving PNG/SVG in Windows. I installed Selenium by \r\n`\r\nconda install selenium\r\n`\r\nthen downloaded chromedriver and put it under the system PATH variable (I think this is working). When I do chart.savechart('test.png'), there's problem message as follows:\r\n\r\n```python-traceback\r\n---------------------------------------------------------------------------\r\nPermissionError                           Traceback (most recent call last)\r\n<ipython-input-16-c16ecf6573c1> in <module>()\r\n----> 1 chart.savechart('test.png')\r\n\r\nG:\\Software\\Anaconda2\\envs\\py36\\lib\\site-packages\\altair\\vegalite\\v2\\api.py in savechart(self, fp, format, **kwargs)\r\n    331             utils.write_file_or_filename(fp, spec_html, mode='w')\r\n    332         elif format in ['png', 'svg']:\r\n--> 333             utils.save_spec(self.to_dict(), fp, format=format, **kwargs)\r\n    334         else:\r\n    335             raise ValueError(\"unrecognized format: '{0}'\".format(format))\r\n\r\nG:\\Software\\Anaconda2\\envs\\py36\\lib\\site-packages\\altair\\utils\\headless.py in save_spec(spec, fp, mode, format, driver_timeout)\r\n    136                                                  spec, mode)\r\n    137         finally:\r\n--> 138             os.remove(htmlfile)\r\n    139     finally:\r\n    140         driver.close()\r\n\r\nPermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\PAGPI_~1\\\\AppData\\\\Local\\\\Temp\\\\tmpbyp9uhvp.html'\r\n```\r\n\r\nI suppose the temp html file is somehow being used in Windows so it's better to remove it after the chromedriver is closed? Let me know if you guys need further testing under Win environment"},"comment":{"url":"https://api.github.com/repos/altair-viz/altair/issues/comments/376042895","html_url":"https://github.com/altair-viz/altair/issues/649#issuecomment-376042895","issue_url":"https://api.github.com/repos/altair-viz/altair/issues/649","id":376042895,"user":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars0.githubusercontent.com/u/781659?v=4","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T04:25:46Z","updated_at":"2018-03-26T04:25:46Z","author_association":"OWNER","body":"Hmm... that's a change that @elyase added so that they could make it work with chromedriver on root. I didn't realize that the existence of the ``geteuid`` function is OS-dependent.\r\n\r\n@elyase, how difficult would it be to make this check work on Windows?"}}
{"actor":{"display_login":"jakevdp"}}