2

I'm working on some maps I badly need for my MA thesis, using Inkscape, based on a map from Wikimedia Commons.

I've opened the original SVG file, edited it and saved it. After closing Inkscape however, the next session of Inkscape is unable to open the SVG file I edited. It says:

Failed to load /filename

No other program seems to be able to open this file either. I did this manipulation several times, with the same error occurring.

Could you help me find out what's wrong with the SVG file I edited?

Caleb
  • 70,105
neydroydrec
  • 3,837
  • Are you able to create a svg file from a blank slate, add some things, save it and then re-open it? Does this affect all svg's saved by inkscape or just this modified one? Are other svg capable programs able to open the original svg? – Caleb Jul 19 '11 at 12:34
  • @Caled: yes i can make new svg and open them. It affects this file only. Other programs are unable to open the affected files. – neydroydrec Jul 19 '11 at 12:46
  • Can you open the original SVG in Inkscape and do a save-as to a new file without making any modifications and then open it? – Caleb Jul 19 '11 at 12:50
  • That's what I did in the first place. It doesn't work. I tried to save as plain svg too, but that was vain too. I am now trying to copy the content of the original map into a new plain file. – neydroydrec Jul 19 '11 at 12:56
  • OK so far copying the items from the original to a new blank file seems to be a good work-around. But that doesn't tell me why copying and modifying the original fails to load. :\ – neydroydrec Jul 19 '11 at 13:09
  • @Benjamin: Can you link to the original Wikimedia file? – Philomath Jul 19 '11 at 17:50
  • Sure, the original file is: http://commons.wikimedia.org/wiki/File:Kerala_locator_map.svg – neydroydrec Jul 20 '11 at 05:25

2 Answers2

3

Based on your comments, I would suggest that there is some combination of corruption in the original svg file and possibly a bug in Inkscape. When opening the file it is able to compensate and display, but it hasn't really understood everything or corrected the mistake and saving causes this discrepancy to tun into outright corruption. Obviously this should not happen, and if the original svg is really from WikiCommons and thus not private, I would suggest you post it on the Inkscape issue tracker.

The copy/paste work around probably works because it forces it to examine and re-write each object and whatever object is correct is likely getting dropped entirely.

Caleb
  • 70,105
1

Refer to this bug report in Inkscape: https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/499257

The problem may be bad handling of character encoding, it sounds like it. The workaround is to manually edit the file ( I use Kate, but any editor with a search functions will do) as suggested in the bug report.

I simply deleted the xpacket elements, and the file opened again. Remember an element is <element>text</element> if you are not used to working with XML or markup languages. If that doesn't work, I'd try changing the character encoding as suggested in the bug report.