Failed to Load

Post questions on how to use or achieve an effect in Inkscape.
Drakizora
Posts: 2
Joined: Thu Dec 31, 2015 8:34 am

Failed to Load

Postby Drakizora » Thu Dec 31, 2015 8:39 am

I was working on an animation and making backgrounds for it. I was keeping them all in one file, and was working on them over a course of a few days. Today, after working on it and giving it routine saves, I saved it one final time, closed it, and shut off my computer. I turned my computer on later and I tried to open it through 'recent'. It gave me "Failed to load the requested file [file]" I tried opening it through the files itself, but it didn't work.

I didn't check before, but now I notice the file is quite large in comparison to others. 13,784 KB :?

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Failed to Load

Postby hulf2012 » Thu Dec 31, 2015 9:23 am

Hello

This problem happens again and again to different users...

- Did you use bitmap images as references for your backgrounds, or created them inside Inkscape?
...
Anyway, from my point of view, it may be anything!...

- Please try to share your file here at the forum. It's better if you use sharing/storage file service

- If you know something about SVG and XML,you can open your file with a text editor. At the end of the file an

Code: Select all

</svg>

tag, should be exist, or should be placed

- Try to open your SVG file in a web browser like Firefox or Chrome. Maybe there it could give you an error message, that might be useful to know what is going on

Good luck!
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Failed to Load

Postby Lazur » Thu Dec 31, 2015 9:29 am

Hi.

That's bad luck. Or is it?
The file size is large enough to hold some data. I would check first if the end </svg>-tag is still present in the file, opened with a notepad.
If not, your file is corrupted some part is chopped off at the end/bottom of the z-order.


-Exactly as Hulf wrote.



If it's a valid svg file, you may open it on a more powerful machine. Or try a different version of inkscape (like 64bit/32bit -they run on different cairo versions which might help, who knows?)

If it opens at a point, run vacuum defs/cleanup file in the file menu. That can shrink the file size and make it more stabile.

Drakizora
Posts: 2
Joined: Thu Dec 31, 2015 8:34 am

Re: Failed to Load

Postby Drakizora » Thu Dec 31, 2015 10:38 am

The backgrounds were combinations of images made in inkscape itself, and bitmaps. I opened the file in Google Chrome and was presented with this:
Image
Here is a link to the file http://www.mediafire.com/download/q58dnu82graars1/Settings.svg and when I checked it using notepad, it didn't have </svg> at the end

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Failed to Load

Postby Lazur » Thu Dec 31, 2015 11:13 am

Then it is corrupted.
Could make it work by editing out an embedded raster image that got "chopped".

(Also there were 98 unused defs.)

The working file is here.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Failed to Load

Postby brynn » Thu Dec 31, 2015 11:28 am

hulf2012 wrote:- Please try to share your file here at the forum. It's better if you use sharing/storage file service


I'm curious why you think it's better to use file sharing/storage, rather than attachment. Is it because of the size, you think the forum might not accept that size?

Otherwise, I usually prefer forum attachments, because it's so much easier to open the file (just 2 clicks!). Often I won't even try to answer a message if I have to go somewhere else to see the image or download the file. Then sometimes I have to save the file before I can open it. Then besides the bother to finally see the image or SVG file, I either have to sacrifice the space taken by the downloaded SVG, (and btw, many, many downloaded files over the years ;) ) or remember to delete it afterwards (yet another few clicks). Rather than go to all that extra trouble, often I find it's easier to just let someone else answer the question.

Of course, that's just me :roll:

What made you all suspect the closing svg tag might be missing?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Failed to Load

Postby Lazur » Thu Dec 31, 2015 11:40 am

This one for example.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Failed to Load

Postby brynn » Thu Dec 31, 2015 11:52 am

Lazur URH wrote:This one for example.


That was answering me? So you thought the closing svg tag might be missing, just because you saw it happen before?

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Failed to Load

Postby hulf2012 » Thu Dec 31, 2015 11:59 am

brynn wrote:
hulf2012 wrote:- Please try to share your file here at the forum. It's better if you use sharing/storage file service


I'm curious why you think it's better to use file sharing/storage, rather than attachment. Is it because of the size, you think the forum might not accept that size?

Otherwise, I usually prefer forum attachments, because it's so much easier to open the file (just 2 clicks!). Often I won't even try to answer a message if I have to go somewhere else to see the image or download the file. Then sometimes I have to save the file before I can open it. Then besides the bother to finally see the image or SVG file, I either have to sacrifice the space taken by the downloaded SVG, (and btw, many, many downloaded files over the years ;) ) or remember to delete it afterwards (yet another few clicks). Rather than go to all that extra trouble, often I find it's easier to just let someone else answer the question.

Of course, that's just me :roll:

What made you all suspect the closing svg tag might be missing?


Yes, it's because the size. In other posts I've seen the complaint about the forum doesn't allow files of big size to be attached.

Drakizora:
Thanks for sharing your file. I see that Lazur already found the solution. I sent a private message with the same solution.
Something more to say:

- Your file has around 24 embedded images. It's better to link images instead of embedding, IMHO. And put them at the same directory your SVG working file is.

- Now, How to do link an image (or several) that already is (are) embedded? :?: I'm still figuring out. I tried an extension that already exists in Inkscape 0.91, but It didn't worked... mmm ... well,I'll see.

Greetings...
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Failed to Load

Postby brynn » Thu Dec 31, 2015 12:13 pm

Extensions menu > Images > Extract is supposed to "un-embed" images. I've never used it, so can't say much about it.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Failed to Load

Postby hulf2012 » Thu Dec 31, 2015 12:31 pm

brynn wrote:Extensions menu > Images > Extract is supposed to "un-embed" images. I've never used it, so can't say much about it.


I used that. As I see, it works one by one. The images are saved in the HOME user directory. It would be better if they are saved relative to the working SVG file... I believe. It could be programmed?... I hope.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Failed to Load

Postby Moini » Thu Dec 31, 2015 12:32 pm

@brynn:
What made you all suspect the closing svg tag might be missing?


It's because if there's an error saving an svg file, it will (often) be that something is missing at the end. These files are written from top to bottom - and if something interrupts the saving process, it will just stop writing the file to disk before it's complete.

The svg closing tag is just an indicator that tells us that the writing of the file to disk didn't finish properly.

(Could it be the program was closed before saving was finished and that that would interrupt the process of saving a long file...? I think it shouldn't, but who knows. That's more a question for suv).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Failed to Load

Postby brynn » Thu Dec 31, 2015 12:33 pm

Oh, thanks Moini. Now I understand better :D

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Failed to Load

Postby Moini » Thu Dec 31, 2015 12:39 pm

@hulf:
It could be programmed?... I hope.

If I understood suv correctly, it's not possible to do this just by changing the extension code with the current status of the extension system, which doesn't hand over info about the file path to extensions.

You could, however, write a shell / python / ... script that uses the extension via command line, and copies the files back to the place where you want them.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Failed to Load

Postby hulf2012 » Thu Dec 31, 2015 1:12 pm

Moini wrote:@hulf:
It could be programmed?... I hope.

If I understood suv correctly, it's not possible to do this just by changing the extension code with the current status of the extension system, which doesn't hand over info about the file path to extensions.

You could, however, write a shell / python / ... script that uses the extension via command line, and copies the files back to the place where you want them.


I'm not sure to understand you:
- There as an attribute: sodipodi:docname. Maybe from there, some reference to the working directory can be achieved.

Now, how the extension transforms the PNG code into an image, and how it can be repeated to all the embedded images in an SVG?? Is there the problem?
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Failed to Load

Postby Moini » Fri Jan 01, 2016 2:15 am

@hulf2012:

"sodipodi:docname" only contains the file name itself, not the path :/ - so you'd have to search the whole disk for that file name, which might take a bit too long to be fun. Also, what should it do if you've got two files of the same name on your disk? And there are files that don't contain that attribute, created with something else than Inkscape. This won't work - it needs to be the Inkscape program itself that tells the extension where the file lives.

The conversion to png is done via base64.decodestring(), then saving to the specified file format.

Here's an extension that saves / links all selected embedded images and numbers them:
extract_images.zip
(2.24 KiB) Downloaded 151 times


It does not recurse into groups, though, so you need to Ctrl+Shift+Click on all images. And a warning: it does not check if the file already exists, so if you repeat the extension, it will overwrite what is there.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Failed to Load

Postby hulf2012 » Fri Jan 01, 2016 7:29 am

Thanks Moini
I'm not sure to have enough time to check (analyse, test) that extension, in detail, right now.

- Did you code it?

About the difficulties of knowing the parent directory of a working file... well ... A way must exist...

a 2016 Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Failed to Load

Postby Moini » Fri Jan 01, 2016 10:00 am

Greetings from 2016, too ;)

Did you code it?


That would be a bit too much to say, no. I've only modified the original extension to export all embedded images among the selected objects and to give more useful error messages. Renamed it, too - added an 's' to 'Export image' ;)

A way must exist...


Of course - either from outside Inkscape via script (and feed the file name into the script), or by learning C++ and working on Inkscape's extension system ;)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”