Error message when applying perspective effect

Bug #168336 reported by Frederik Elwert
6
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Aaron C Spike

Bug Description

When I use the perspective effect (Effects → Modify path →
Perspective), I get an error message about failure of format autodetecting.
The error seems to have no influence on the result, because the effect
works.

Here is the message:

** (inkscape:22493): WARNING **: Format autodetect failed. The file is
being opened as SVG.

** (inkscape:22494): WARNING **: Format autodetect failed. The file is
being opened as SVG.

** (inkscape:22495): WARNING **: Format autodetect failed. The file is
being opened as SVG.

** (inkscape:22496): WARNING **: Format autodetect failed. The file is
being opened as SVG.

Revision history for this message
Aaron C Spike (acspike) wrote :

Originator: NO

This is of course a "warning" message rather than an "error" message and
therefore is not critical to the function of the script. :-)

I've made a value judgment and masked this warning in current svn by
discarding stderr that this script receives from its nested calls to
inkscape. This means that we may mask real problems, but I assume they will
be few and it will certainly create fewer bug reports than the warning has.

Revision history for this message
Kattekrab (donna) wrote :

Just tried to use the perspective tool
"Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected." This bug is marked as 'fix released' but is returning an error - and is not producing the perspective effect as a result... full error message pasted below.

Changed in inkscape:
status: Fix Released → Confirmed
Revision history for this message
Kattekrab (donna) wrote :

Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/perspective.py", line 133, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 172, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/perspective.py", line 85, in effect
    solmatrix[i][0] = sp[i][0]
UnboundLocalError: local variable 'sp' referenced before assignment

Revision history for this message
prkos (prkos) wrote :

Kattekrab what OS and Inkscape version are you using?

I'm on linux and build 20254 and perspective works ok.

Revision history for this message
Kattekrab (donna) wrote : Re: [Bug 168336] Re: Error message when applying perspective effect

On Sun, 2008-11-30 at 11:12 +0000, prkos wrote:
> Kattekrab what OS and Inkscape version are you using?

Ubuntu 8.10
SVN 20214

> I'm on linux and build 20254 and perspective works ok.

Thanks! I'll build a new one tonight and see if it's fixed.

- Donna

--
Donna Benjamin - Executive Director
creative contingencies pty ltd - http://www.cc.com.au/
when plan a fails and there's no plan b, plan cc
open source - facilitation - web services

Revision history for this message
Aaron C Spike (acspike) wrote :

Please attach the file with instructions to reproduce. sp is defined conditionally and it may be an issue with your selection. Also please add the output of `which inkscape` and verify that this is the inkscape you are currently running.

Revision history for this message
Kattekrab (donna) wrote :

D'oh! It works if you select the text first, then the bezier path... would it be possible for inkscape to say that instead of the python traceback?

EG: "To use the perspective effect, select the item you wish to modify first, then the perspective path it should follow"?

or something like that :)

Inkscape Version:
-----------------------
Format: 1.8
Date: Sun, 30 Nov 2008 23:13:18 +1100
Source: inkscape
Binary: inkscape
Architecture: source i386
Version: 0.46.0-1cafuego1+svn-20286
Distribution: intrepid

Steps to Reproduce:
-------------------------
1. create text
2. convert text to path
3. create box with bezier
4. select path, shift select text
4. select Effects -> Modify Path -> Perspective

Error/Warning returned:
------------------------------
Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/perspective.py", line 133, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 172, in affect self.effect() File "/usr/share/inkscape/extensions/perspective.py", line 85, in effect solmatrix[i][0] = sp[i][0]UnboundLocalError: local variable 'sp' referenced before assignment

Revision history for this message
prkos (prkos) wrote :

Requests have already been made to make the effects and all other tricky functions more user friendly.

Changed in inkscape:
status: Confirmed → Invalid
Revision history for this message
Aaron C Spike (acspike) wrote :

Rather than closing this, can we make it a feature request? I think I can't do that because I'm not on the bug team.

Revision history for this message
prkos (prkos) wrote :

Do you think this covers it: bug 186582?

Have you applied to be on the team? I'm sure you'll be approved right away.

Revision history for this message
Kattekrab (donna) wrote :

https://bugs.launchpad.net/inkscape/+bug/186582

yep - that mostly covers it... except for the order of selection issue.

have left a comment there too.

Revision history for this message
Kattekrab (donna) wrote :

There is still an issue here - and does not seem to have been adequately resolved.

Changed in inkscape:
status: Invalid → Incomplete
Revision history for this message
Kattekrab (donna) wrote :

Alvin Penner submitted a patch that goes along way toward resolving this issue - but the selection order is still unresolved.

see: https://bugs.launchpad.net/inkscape/+bug/186582

Changed in inkscape:
status: Incomplete → In Progress
Revision history for this message
Alvin Penner (apenner) wrote :

I believe the original error message has been avoided. If there are no objections, I'm going to mark this as Fix Released.
If there are still unresolved issues, perhaps a new bug could be raised.

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
rogkmyers (rogkmyers) wrote :

Im using mac OS X 10.5.8. When I run the Perspective script I get the following error message.

Traceback (most recent call last):
  File "Contents/Resources/extensions/perspective.py", line 158, in <module>
    e.affect()
  File "/Applications/Inkscape.app/Contents/Resources/extensions/inkex.py", line 198, in affect
    self.effect()
  File "Contents/Resources/extensions/perspective.py", line 89, in effect
    q[query] = float(p.stdout.read())
ValueError: invalid literal for float(): Warning: AppleCollationOrder setting not found, using AppleLocale.
Setting Language: .UTF-8
574.71933

Revision history for this message
Alvin Penner (apenner) wrote :

- which version of Inkscape? the source code for the perspective effect was modified in Dec 2008.
- could you attach the svg file which is causing the problem?

Revision history for this message
su_v (suv-lp) wrote :

Confirmed with the latest Inkscape 0.47pre2-2 from sf.net on OS X 10.5.8

works fine with my local r22200 build (using modified launch scripts and local MacPorts python 2.6 including all necessary site-packages installed with MacPorts)

Seems to be an issue with the packaging of inkscape and python modules for osx -> better to file a separate report?

Revision history for this message
su_v (suv-lp) wrote :

works fine with Inkscape 0.47pre1-2 from sf.net on OS X 10.5.8

i.e. could be related to no longer setting DYLD_LIBRARY_PATH for inkscape-bin and its shared libraries?

Revision history for this message
su_v (suv-lp) wrote :

or due to 'echo' output in Contents/Resources/bin/inkscape (committed in SVN revision 21865 <http://inkscape.svn.sourceforge.net/viewvc/inkscape?view=rev&revision=21865> )

Revision history for this message
su_v (suv-lp) wrote :

Redirecting the echo stdout to stderr in the launcher script 'packaging/macosx/Resources/bin/inkscape' fixes this particular python extension failure with Inkscape 0.47pre2-2 on OS X 10.5.8

Revision history for this message
Michael Wybrow (mjwybrow) wrote :

The Mac fix for this is included in Inkscape-0.47pre2-3.LEOPARD+.dmg

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.