[Win32] Perspective / Envelope error (ValueError: empty string for float)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Tom Davidson |
Bug Description
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
q[query] = float(f.read())
ValueError: invalid literal for float(): RegistryTool: Could not set the value 'C:\Program Files\Inkscape\
116.17442
prkos (prkos) wrote : | #1 |
Changed in inkscape: | |
status: | New → Confirmed |
Tom Davidson (tjd-mit) wrote : | #2 |
prkos also noted in bug 168796 that a similar error is seen in the 'envelope effect'. His comment is pasted here:
Im using the build from 27th Dec and still get error:
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
self.q[query] = float(f.read())
ValueError: empty string for float()
On 16848 on fedora the Envelope works but I get this:
** (inkscape:9437): WARNING **: Format autodetect failed. The file is being opened as SVG.
** (inkscape:9438): WARNING **: Format autodetect failed. The file is being opened as SVG.
** (inkscape:9439): WARNING **: Format autodetect failed. The file is being opened as SVG.
** (inkscape:9440): WARNING **: Format autodetect failed. The file is being opened as SVG.
Tom Davidson (tjd-mit) wrote : Re: Perspective / Envelope errors on Vista machine | #3 |
(Should have said "his/her comment", above, of course)
Bug 179683 suggests that these problems may be due to a permissions problem. Can someone test whether the same errors happen when using a user account with Administrator privileges?
Tom Davidson (tjd-mit) wrote : | #4 |
Setting milestone since I merged in a milestoned bug (bug 168796) to this one.
Changed in inkscape: | |
milestone: | none → 0.46 |
importance: | Undecided → Medium |
prkos (prkos) wrote : | #5 |
*cough cough* yes it is "her" comment :D
The above Traceback is done on a user account with admin privileges (on WinXP).
Both Envelope and Perspective work ok on fedora 7, no more format messages (though envelope can give some strange results if the skeleton is much bigger than the object but you can work around it easily).
Bryce Harrington (bryce) wrote : | #6 |
The title suggests this is a Vista-only issue, is that correct? If it works acceptably in other versions of Windows, and works fine on non-Linux systems as prkos indicates, then I don't think we should consider it a release blocker issue, and drop the milestone.
Changed in inkscape: | |
status: | Confirmed → Incomplete |
CamiloSanchez (camilosanchez2) wrote : RE: [Bug 176750] Re: Perspective / Envelope errors on Vista machine | #7 |
i dont think this problem is vista related, i think the problem goes beyond that since many users in different OS have expressed the same bug.
_______
Visit(a) mi/my Blog! Dia Sideral/Sidereal Day <click aqui<click here
_______
> From: <email address hidden>
> To: <email address hidden>
> Date: Mon, 7 Jan 2008 00:43:24 +0000
> Subject: [Bug 176750] Re: Perspective / Envelope errors on Vista machine
>
> The title suggests this is a Vista-only issue, is that correct? If it
> works acceptably in other versions of Windows, and works fine on non-
> Linux systems as prkos indicates, then I don't think we should consider
> it a release blocker issue, and drop the milestone.
>
> ** Changed in: inkscape
> Status: Confirmed => Incomplete
>
> --
> Perspective / Envelope errors on Vista machine
> https:/
> You received this bug notification because you are a direct subscriber
> of the bug.
_______
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://
Bryce Harrington (bryce) wrote : Re: Perspective / Envelope errors on Vista machine | #8 |
Camilo, can you provide references to these other reports of the same bug?
Peter Lewerin (vermeil-deactivatedaccount) wrote : | #9 |
Maybe it's this dog that's biting us: <URL: http://
The only scripts that use os.popen are g2pngs.py, gimp_xcf.py, summersnight.py, and perspective.py. Only the latter two try to read from the pipe, and neither of them seems to work on WinXP.
prkos (prkos) wrote : | #10 |
It also happens on WinXP, build 6th Jan
Perspective:
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
q[query] = float(f.read())
ValueError: empty string for float()
Envelope:
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
self.q[query] = float(f.read())
ValueError: empty string for float()
Tina Russell (tinarussell) wrote : | #11 |
Waaah! I'm getting the error on Ubuntu 7.10. I can provide more info if needed.
Tina Russell (tinarussell) wrote : | #12 |
I changed to the Jan. 4 build, and then "Perspective" gave me the error that I had to install the lxml module. I installed that through the package manager, and now I get this weird error and traceback for "Perspective:"
Traceback (most recent call last):
File "/usr/share/
e.affect()
File "/usr/share/
self.effect()
File "/usr/share/
q[query] = float(f.read())
ValueError: invalid literal for float(): Initting inputs
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
Input::Input
In
Inkscape also now has a weird window maximization error, if that helps...
Changed in inkscape: | |
status: | Incomplete → Confirmed |
Peter Lewerin (vermeil-deactivatedaccount) wrote : Re: Perspective / Envelope errors | #13 |
Both scripts work on WinXP with the 2008-01-11 (21:53) version.
prkos (prkos) wrote : | #14 |
Are you sure? Im getting the same traceback messages as in my last comment.
Peter Lewerin (vermeil-deactivatedaccount) wrote : | #15 |
Hmm, just tried it again. Perspective works when I start up Inkscape normally, but crashes if I run it through gdb.
Got to clean the house now, I'll look at it again tonight.
Peter Lewerin (vermeil-deactivatedaccount) wrote : | #16 |
Yes, I'm positive. Both Perspective and Envelope work fine in regular Inkscape, but crash when starting Inkscape from gdb.
My backtrace indicates a problem with the debugging code:
#0 0x7c901231 in ntdll!DbgUiConn
from C:\WINDOWS\
#1 0x7c96c943 in ntdll!RtlpNtMak
from C:\WINDOWS\
#2 0x0022ece4 in ?? ()
#3 0x7c96cd80 in ntdll!RtlpNtMak
from C:\WINDOWS\
#4 0x00d572c0 in intl!bind_
#5 0x003f0000 in ?? ()
#6 0x00d572c8 in intl!bind_
#7 0x0022ed58 in ?? ()
#8 0x7c96df66 in ntdll!RtlpNtMak
from C:\WINDOWS\
#9 0x003f0000 in ?? ()
#10 0x00d572c0 in intl!bind_
#11 0x7c96e11c in ntdll!RtlpNtMak
from C:\WINDOWS\
#12 0x003f0000 in ?? ()
#13 0x00d572c8 in intl!bind_
#14 0x40000060 in ?? ()
#15 0x00000000 in ?? ()
Tom Davidson (tjd-mit) wrote : | #17 |
@Tina: do you have the 'numpy' library installed ? If not, could you install it and report back if that helps?
Tina Russell (tinarussell) wrote : Re: Perspective / Envelope error (ValueError: empty string for float) | #18 |
Yep, I have “numpy” installed. Not having it was an earlier error I got, but was easy enough to fix with the package manager.
By the way, “Perspective” works for me again (hooray), as of some recent (post-Jan 8th) snapshot. Now my main problem is a weird window maximization bug that I wrote about somewhere here on Launchpad...
Tom Davidson (tjd-mit) wrote : | #19 |
Tina's comment means that this bug is currently only being reported under Windows, which supports Peter L's hypothesis...
Fithian (fithian) wrote : | #20 |
Certain function of Inkscape only work in Vista if you run as administrator i.e. Perspective or Envelope
Bryce Harrington (bryce) wrote : | #21 |
In order for this to remain milestoned, we must have an assignee for the bug, who will take ownership of getting it fixed.
We cannot block the release on platform-specific bugs that have no owner.
Tom Davidson (tjd-mit) wrote : | #22 |
Assigning to myself as 'fix or remove'. If this extension is not fixed before 0.46, it should not be shipped with Windows. Work on a fix can continue in the next development branch...
Changed in inkscape: | |
assignee: | nobody → tjd-mit |
Johan Engelen (johanengelen) wrote : | #23 |
How exactly is this extension meant to work?
I can make it do something, but...
please explain it or submit a test file.
Thank you very much.
prkos (prkos) wrote : | #24 |
- enveltest.svg Edit (2.9 KiB, image/svg+xml)
Im attaching a test file, it contains 2 paths, one star-like and the other a 4-node skeleton, the skeleton must be selected last. Run Envelope and the star should be deformed to adjust to the skeleton. (the same with Perspective).
This is what I get from gdb when trying to execute Perspective or Envelope on WinXP, 25th Feb build:
warning: HEAP[inkscape.exe]:
warning: Invalid Address specified to RtlFreeHeap( 03880000, 00D61240 )
Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConn
(gdb) bt
#0 0x7c901231 in ntdll!DbgUiConn
from C:\WINDOWS\
#1 0x7c96c943 in ntdll!RtlpNtMak
from C:\WINDOWS\
#2 0x0022ece4 in ?? ()
#3 0x7c96cd80 in ntdll!RtlpNtMak
from C:\WINDOWS\
#4 0x00d61238 in sp_feTurbulence
)::__PRETTY_
#5 0x03880000 in ?? ()
#6 0x00d61240 in sp_feTurbulence
)::__PRETTY_
#7 0x0022ed58 in ?? ()
#8 0x7c96df66 in ntdll!RtlpNtMak
from C:\WINDOWS\
#9 0x03880000 in ?? ()
#10 0x00d61238 in sp_feTurbulence
)::__PRETTY_
#11 0x7c96e11c in ntdll!RtlpNtMak
from C:\WINDOWS\
#12 0x03880000 in ?? ()
#13 0x00d61240 in sp_feTurbulence
)::__PRETTY_
#14 0x40000060 in ?? ()
#15 0x00000000 in ?? ()
Alvin Penner (apenner) wrote : | #25 |
running the win32 binary build : Inkscape-
on Windows XP Professional
both the Perspective and Envelope effects are working well, thanks for the demo svg file, it clarified things considerably.
prkos (prkos) wrote : | #26 |
I just installed pre3 (on WinXP) and still no luck with Perspective or Envelope, I get the same traceback like reported above. All other Modify Path extensions are working.
If the problem might be my system, what can I test? Python seems to work for everything else.
Alvin Penner (apenner) wrote : | #27 |
I've kind of lost track of the thread here. What happens if you run it without gdb?
prkos (prkos) wrote : | #28 |
If I run normally I get:
Perspective:
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
q[query] = float(f.read())
ValueError: empty string for float()
Envelope:
Traceback (most recent call last):
File "share\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "share\
self.q[query] = float(f.read())
ValueError: empty string for float()
I can't get gdb to work atm but if I remember correctly Inkscape froze when I selected Perspective or Envelope from the menu (the menu wouldn't close).
Alvin Penner (apenner) wrote : | #29 |
sorry, I didn't read the thread very carefully. I'm at a loss as to what is happening here. The only thing I can think of is to check how recent the .pyc files are. In the extensions directory there are files like inkex.pyc, simplepath.pyc, ffgeom.pyc, cubicsuperpath.pyc. These are compiled automatically from the corresponding .py files. If the .pyc files are not newer than the .py files then you should force a re-compile by renaming the .pyc file to be something else, which would make python create a new version.
sas (sas-sas) wrote : | #30 |
I've tried the Envelope effect (with the enveltest.svg file that prkos attached) under Windows XP, and it worked without problem, in both 0.46pre2 and 0.46pre3.
One thing I would suggest is to see what Inkscape is producing on stderr when it (apparently) produces nothing on stdout. I can post a modified version of summersnight.py to do this if anybody wants it.
Ulferikson (ulferikson) wrote : | #31 |
There is another bug about extensions not working unless python is in the search path since Inkscape simply calls for "python". The summersnight.py script similarly calls "inkscape" without a path. Is Inkscape in your search path?
sas (sas-sas) wrote : | #32 |
- summersnight.py Edit (3.2 KiB, text/x-python)
I can reproduce the problem by renaming inkscape.exe to something else. So it looks like Ulferikson may be on the right track, insofar as the script's attempt to run Inkscape may be failing because inkscape.exe can't be found. But inkscape.exe isn't in the path on my machine, and yet the Envelope effect works, so there's more to it than this.
I'm attaching a modified version of summersnight.py that reports the message from stderr back to Inkscape on failure. If someone who is experiencing the problem could try the Envelope effect with this summersnight.py, and report the result, it would clarify what is happening.
prkos (prkos) wrote : | #33 |
Thank you sas for the file, here is what I got when I ran Envelope with it:
** (inkscape.
** (inkscape.
** (inkscape.
(inkscape.
The system cannot find the path specified.
I did try paths before and it still didn't work (I tried .bat and also globally in environment variables)
theAdib (theadib) wrote : | #34 |
I patched trunk that might affect this problem. pls see https:/
theAdib (theadib) wrote : | #35 |
can someone confirm this is solved on recent pre4 snapshot? Thx, Adib.
Changed in inkscape: | |
status: | Confirmed → Fix Committed |
prkos (prkos) wrote : | #36 |
I copied the libpng13.dll and renamed into 12 to make it start
I still have the same issue, heres what I get on pre4 (other extensions seem to work ok):
Envelope:
Traceback (most recent call last):
File "C:\Program Files\Inkscape\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "C:\Program Files\Inkscape\
self.q[query] = float(f.read())
ValueError: empty string for float()
Perspective:
Traceback (most recent call last):
File "C:\Program Files\Inkscape\
e.affect()
File "C:\Program Files\Inkscape\
self.effect()
File "C:\Program Files\Inkscape\
q[query] = float(f.read())
ValueError: empty string for float()
nothing in gdb
Rygle (rygle) wrote : | #37 |
Don't know if this is the patch you mean, but the spawn patch should be in trunk, and ready to be applied in the \packaging\
The patch I mean is here - https:/
sas (sas-sas) wrote : | #38 |
The error messages that prkos reports in her post of 2008-03-12 seem to show that the Python script calls Inkscape with a truncated filename, since the temporary SVG file shouldn't be C:\DOCUME~1\m. (It should be something like %tmpdir%
Perhaps someone who is experiencing this problem could try the following: in your Inkscape directory, type
set TMPDIR=C:\
at the command prompt, and then
inkscape.exe
and then try the envelope effect. Does it work? If it still doesn't work, what does my modified version of summersnight.py report?
prkos (prkos) wrote : | #39 |
thats it thank you sas!!
set TMPDIR=C:\ works for both Envelope and Perspective
do you still need the test with the summersnight.py?
sas (sas-sas) wrote : | #40 |
No, there's no need to test with the modified summersnight.py, as it's just the same as the original when everything works.
Although we now have a workaround, I still don't really understand what is going wrong. Is the second character of your Windows username something that might conceivably cause problems (like a space, or a punctuation mark, or a non-ASCII character)?
I could try replacing the os.popen3 call in the script by using the newer subprocess module, but I don't know if this would make any difference.
Ulferikson (ulferikson) wrote : | #41 |
By setting TMPDIR to point to a direcotry containing a space in its name I too see an "empty string" error. Adding escaped quotes to the last %s in the call to os.popen3() seems to help.
prkos (prkos) wrote : | #42 |
its &
I didn't pick up at all what was going on until you mentioned the second character. Whats in a name eh?
sas (sas-sas) wrote : | #43 |
- summersnight.py Edit (3.1 KiB, text/x-python)
Adding quotes (as Ulferikson suggests) works for "&" as well. I'm attaching a fixed version of summersnight.py - can someone confirm that this is OK on Linux too (I think it should be)?
Changed in inkscape: | |
status: | Fix Committed → Confirmed |
theAdib (theadib) wrote : | #44 |
sas, prkos: I can't follow this thread. Please give a short status! Is this issue now in c-code or in the python code?
Regarding the temp I have to say defining a temp is not so good. Microsoft defines for each user a separate directory somewhere in "c:\documents and settings\username"
Or is there an error in implementation of temp_file function ?
Adib.
sas (sas-sas) wrote : | #45 |
The issue is in the Python scripts.
Setting TMPFILE was just a test, to try to determine the problem. The fix won't change the temp directory.
The fix is just to add some quotes in the scripts. I can post a patch, but I would like someone to confirm that the latest summersnight.py that I posted really does fix the problem, and that it works OK on Linux too.
prkos (prkos) wrote : | #46 |
With the new summersnight.py the Envelope works, but Perspective doesnt (the errors there are in perspective.py I guess). The result is the same in pre4-2 and todays build 31st March.
What do you need tested on linux? Effects or weird characters in names? Perspective and Envelope work ok on Jan 10th build on fedora 7.
prkos (prkos) wrote : | #47 |
I tested the latest summersnight.py on fedora 7, Jan 10th build and it all seems to work ok. Maybe someone with a newer build should test also.
sas (sas-sas) wrote : | #48 |
- perspective.py Edit (5.0 KiB, text/x-python)
Yes, summersnight.py is just the Envelope effect. Here's the fixed perspective.py, if anyone wants to test it.
sas (sas-sas) wrote : | #49 |
- patch for summersnight.py Edit (589 bytes, text/plain)
Thanks for testing on Fedora. (The build doesn't matter much - I just wanted to be sure that the quotes don't cause any problem on Linux.)
So here's the patch for the Envelope effect.
sas (sas-sas) wrote : | #50 |
- patch for perspective.py Edit (577 bytes, text/plain)
And here's the patch for the Perspective effect.
Do we need to patch gimp_xcf.py too? It looks to have the same problem, but nobody has mentioned it.
prkos (prkos) wrote : | #51 |
I tested perspective.py on pre4-2 and build 31st March and Perspective effect now works. thanx sas!
prkos (prkos) wrote : | #52 |
pitty this didn't make it into official 0.46, could someone pls apply the 2 pathes?
sas (sas-sas) wrote : | #53 |
- bug176750.patch Edit (1.3 KiB, text/plain)
Here's a combined patch, if that makes it any easier to apply.
Rygle (rygle) wrote : | #54 |
Built on Windows XP SP2 using the latest trunk and doesn't seem to cause any extra problems. I know this is a vista problem, just reporting results. Perspective and Envelope worked both with and without patch.
prkos (prkos) wrote : | #55 |
this bug only occurs when you have weird characters in your win username (like & for example like I do), so to make it work on my machine I need the patch :D
Rygle (rygle) wrote : | #56 |
Added in to trunk - revision 18410.
Rygle (rygle) wrote : | #57 |
Changing to Fix Committed as this has already been added to trunk. Milestoning for 0.46.1.
Changed in inkscape: | |
milestone: | 0.46 → 0.46.1 |
status: | Confirmed → Fix Committed |
Rygle (rygle) wrote : | #58 |
Added to 0.46 release branch as a patch for 0.46.1 under /packaging/
Rygle (rygle) wrote : | #59 |
The above was at revision 18468
Alvin Penner (apenner) wrote : | #60 |
it looks to me that this has been resolved, marking as fix released
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Traceback (most recent call last):
File "share\ extensions\ perspective. py", line 127, in <module>
e.affect()
File "C:\Program Files\Inkscape\ share\extension s\inkex. py", line 153, in affect
self.effect()
File "share\ extensions\ perspective. py", line 72, in effect
q[query] = float(f.read())
ValueError: empty string for float()
Im on WinXP, latest dev build