save PNG/SVG in Windows
See original GitHub issueI encountered a problem saving PNG/SVG in Windows. I installed Selenium by
conda install selenium
then 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:
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
<ipython-input-16-c16ecf6573c1> in <module>()
----> 1 chart.savechart('test.png')
G:\Software\Anaconda2\envs\py36\lib\site-packages\altair\vegalite\v2\api.py in savechart(self, fp, format, **kwargs)
331 utils.write_file_or_filename(fp, spec_html, mode='w')
332 elif format in ['png', 'svg']:
--> 333 utils.save_spec(self.to_dict(), fp, format=format, **kwargs)
334 else:
335 raise ValueError("unrecognized format: '{0}'".format(format))
G:\Software\Anaconda2\envs\py36\lib\site-packages\altair\utils\headless.py in save_spec(spec, fp, mode, format, driver_timeout)
136 spec, mode)
137 finally:
--> 138 os.remove(htmlfile)
139 finally:
140 driver.close()
PermissionError: [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'
I 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
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (18 by maintainers)
Top Results From Across the Web
How to convert a PNG image to a SVG? - Stack Overflow
Click "File" and select "Open" to load the .PNG file into the program.Edit the image as needed before saving it as a .SVG...
Read more >How to save images as PNG when my pc will only save them ...
When I want to save an image from the internet that is suppose to be a PNG my PC will save it as...
Read more >7 Best Free PNG to SVG Converter Software For Windows
Use these PNG to SVG converter software to convert PNG to SVG or other formats like JPG, BMP, TIFF, etc. You can also...
Read more >Convert Images from PNG to SVG for Free | Adobe Express
1. Select. Choose a PNG image from your photo library that is less than 2GB in size.
Read more >SVG Files: What They Are and How to Open & Convert Them
An SVG file is a Scalable Vector Graphics file. · Open one with any browser or an image tool like Photoshop, Illustrator, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
pip install git+git://github.com/altair-viz/altair.git
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.@elyase, how difficult would it be to make this check work on Windows?