Traceback on Embed Image from context menu on a linked SVG file (1.0.x)
Summary:
I get a traceback when right clicking on an SVG image embedded in another SVG image and selecting Embed Image
.
This is a follow-up to a related issue here: #283 (closed)
I'm filing this issue here as the right-click context menu appears to exist in core inkscape, rather than an extension. The code for adding Embed Image
to the right-click context menu is in core inkscape, at any rate.
I tried copying these files from master into ~/.config/inkscape/extensions
:
embedimage.inx
embedimage.py
embedselectedimages.inx
I saw another Extensions > Images > Embed Images...
menu option, so I think I installed the master copy correctly, but that did not make the right-click context menu Embed Image
option work.
Steps to reproduce:
- open Inkscape
- open SVG image that embeds another SVG image
- right click on embedded SVG image
- select
Embed Image
- get traceback
What happened?
I got this traceback:
Traceback (most recent call last):
File "embedimage.py", line 119, in <module>
EmbedImage().run()
File "/snap/inkscape/7809/share/inkscape/extensions/inkex/base.py", line 140, in run
self.save_raw(self.effect())
File "embedimage.py", line 56, in effect
self.embed_image(node)
File "embedimage.py", line 60, in embed_image
xlink = node.get('xlink:href')
AttributeError: 'str' object has no attribute 'get'
What should have happened?
The image should have been embedded
Sample attachments:
See SVG files from #283 (closed) , for easy downloads bar.svg and foo.svg (open foo.svg)
Version Info:
- Inkscape Version: 1.0-9f2f71dc58-2020-08-02 (7809) [installed via snap]
- Operating System: Ubuntu
- Operating System version: 20.04
From comments, issue was introduced in 6b3e47e4