extensions emded images

Asked by sabu

I tried jpeg&png images to embed svgfile.
One case succeeded but another case failed.
(depend on image)
-------------------------------------------------------------
error message
No xlink:href or sodipodi:absref attributes found, or they do not point to an existing file! Unable to embed image.
Traceback (most recent call last):
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 105, in <module>
    e.affect()
  File "D:\vista\Program Files\Inkscape\share\extensions\inkex.py", line 207, in affect
    self.effect()
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 36, in effect
    self.embedSelected(self.document, self.selected)
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 46, in embedSelected
    self.embedImage(node)
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 76, in embedImage
    inkex.errormsg(_("Sorry we could not locate %s") % path)
  File "D:\vista\Program Files\Inkscape\share\extensions\inkex.py", line 86, in errormsg
    sys.stderr.write((str(msg) + "\n").encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 47: ordinal not in range(128)
----------------------------------------------------------------------
environment windows vista

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jazzynico (jazzynico) said :
#1

Hi,

I've updated this extension recently and fixed some issues related to paths and Unicode on Windows.
The new files are available in the dev trunk here:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head%3A/share/extensions/

Could you please download embedimage.py and inkex.py, move them to your share\extensions folder and try again?
Thanks!

Revision history for this message
sabu (mlh27198) said :
#2

Thanks your quick replay.
I tried your advice.
The problem is file name(and/or folder name) including 2Bcodo(Japanese).
Most case new codes clear the problem. But some case still error.
Error message
------------------------------------------------
Traceback (most recent call last):
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 106, in <module>
    e.affect()
  File "D:\vista\Program Files\Inkscape\share\extensions\inkex.py", line 208, in affect
    self.effect()
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 36, in effect
    self.embedSelected(self.document, self.selected)
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 46, in embedSelected
    self.embedImage(node)
  File "D:\vista\Program Files\Inkscape\share\extensions\embedimage.py", line 72, in embedImage
    path=unicode(path, "utf-8")
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 30-32: invalid data
------------------------------------------------
Picture 161 failed(including 2B filename)
Picture 162 normal(including 2B filename)
Thanks
From sabu
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of JazzyNico
Sent: Thursday, February 25, 2010 8:51 PM
To: <email address hidden>
Subject: Re: [Question #102359]: extensions emded images

Your question #102359 on Inkscape changed:
https://answers.edge.launchpad.net/inkscape/+question/102359

    Status: Open => Answered

JazzyNico proposed the following answer:
Hi,

I've updated this extension recently and fixed some issues related to paths and Unicode on Windows.
The new files are available in the dev trunk here:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head%3A/share/extensions/

Could you please download embedimage.py and inkex.py, move them to your share\extensions folder and try again?
Thanks!

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.edge.launchpad.net/inkscape/+question/102359/+confirm?answer_id=0

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.edge.launchpad.net/inkscape/+question/102359

You received this question notification because you are a direct
subscriber of the question.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4896 (20100225) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Revision history for this message
jazzynico (jazzynico) said :
#3

Hi Sabu,

Recent changes have been applied in the dev version (which will be 0.48 in a few months), and Inkscape default behavior now consists in embedding bitmaps when importing them (a dialog allows you to use a link if you want). Thus the embed image extension is not as critical as it was in the previous versions.

This dev version is already very stable, and can be downloaded here: http://inkscape.modevia.com/win32/?M=D
Could you please test and report if this new version solve you problem?

Also note that students are working on a link management dialog which should make embedding and linking far easier in the future (planned for 0.49).

Regards.

Can you help with this problem?

Provide an answer of your own, or ask sabu for more information if necessary.

To post a message you must log in.