Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Benjamin 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. –  Benjamin 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. :\ –  Benjamin Jul 19 '11 at 13:09
show 2 more comments

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.