8

I'm currently using Inkscape 0.48.4 (64 bits) on Windows 8.

I downloaded the inkscape2tikz extension, copied the three files on the lower left and put them in the inkscape/share/extensions directory.

Everything so far so good. I even get everything right on the Extension -> Export -> Export to TikZ path menu, but and after I click on the apply button, I get this error:

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.

Traceback (most recent call last):
  File "tikz_export.py", line 1419, in <module>
    main_inkscape()
  File "tikz_export.py", line 1407, in main_inkscape
    effect.affect()
  File "C:\Program Files\Inkscape-0.48\share\extensions\inkex.py", line 216, in affect
    if output: self.output()
  File "tikz_export.py", line 1350, in output
    f = codecs.open(self.options.outputfile, 'w', 'utf8')
  File "C:\Program Files\Inkscape-0.48\python\Lib\codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: 'Myfilename'

Any ideas what might be wrong? Is this because of the extension or is it because of inkscape per se? Maybe it has to do something with it being 32 bits?

Furthermore, I'm not able to locate the .tex file. It is not on the same folder as the extensions mentioned above, or as described in here. Actually, I couldn't find them at all.

On the other hand, saving as TikZ works perfectly, but did I need to download the extensions to actually have this feature, or was it built-in and downloading the inkscape2tikz extension was a waste of time?

Side note This all comes from here: Drawing Roman laurel leaves (SPQR) in TikZ

Mario S. E.
  • 18,609
  • 1
    It seems it has something to do with permissions. I'm helpless when it comes to Windows, but try to edit line 1350 of file tikz_export.py so that it prints the file that is trying to access. Perhaps you can write "raise RuntimeError(self.options.outputfile)" to get it. Then check the permissions on the directory.... – dsign Apr 24 '14 at 18:16
  • @dsign I'm completely idiotic about this. Where do I write the raise RuntimError.... Where do yo I check the permissions on the directory? – Mario S. E. Apr 24 '14 at 18:28
  • We are two then :-) In the file tikz_export.py, look for the line number 1350 and there write that sentence, in a line of their own, and with the same indentation level of the if that follows. Then run the effect again, you will get a new error, this time with the file name. Use the directory part of that filename, right click in the Windows explorer, and check permissions there.... this is the part where I'm utterly helpless, file permissions in Windows are to me more complex than string theory... – dsign Apr 24 '14 at 18:40
  • 1
    Sorry Mario, I didn't have the chance to look at it. I remember having the same problem and I fixed via some Run as Administrator combo on Inkscape. I'll let you know when I can actually sit on the computer for a while. – percusse Apr 24 '14 at 23:00
  • @MarioS.E. Does this work for you http://www.inkscapeforum.com/viewtopic.php?f=5&t=14046 ? – percusse Apr 26 '14 at 09:43
  • @percusse I guess its better to just save as tikz. It works, though :) – Mario S. E. May 06 '14 at 16:19
  • @MarioS.E. is this solved? If so, could you write a self-answer? – Paul Gessler Jan 14 '15 at 01:01

1 Answers1

2

As percusse wrote:

and I fixed via some Run as Administrator combo on Inkscape. running with administrative rights fixes the error.

The file is then exported to the extension folder, which you need rights to write to. That's where the error comes from.


Without changing any paths (on Win7), just type the full path into the "Output filename" box (possibly with an ending like .tikz), e.g.:

'C:\Users\Username\Documents\...\filename.tikz'

Though, as mentioned in the comments simply using save as TikZ code (*.tex) is probably best.

BadAtLaTeX
  • 1,139