textext error. pstoedit failing

Issue #35 resolved
Former user created an issue

Suddenly I began having a problem with the last version of Pauli Virtanen's textext 0.4.4. Then I realized that an enhanced version was available here. However, this one 0.6.1 is not working either. Something with pstoedit is not working properly.

I am working on Ubuntu 16.04 64 bit. The same error happens on two different machines. The error message I get is in the attached file. It seems that pstoedit is failing due to a bad filename?

Comments (17)

  1. Pit Garbe repo owner

    Hm, the output looks like the temporary file can't be found:

    Last OS error: No such file or directory
    Current file position is 87896
    GPL Ghostscript 9.18: Unrecoverable error, exit code 1
    

    That is quite intriguing, as there shouldn't be any access rights issues in the /tmp directory.

  2. Eric Gourgoulhon

    PS: I was using Inkscape 0.91 + textext 0.4.4 when the issue suddenly appeared. I've upgraded to Inkscape 0.92.1~devel+15420-69~ubuntu16.04.1 + textext 0.6.1, but the issue is still there. I don't know if this is relevant, but the file /tmp/tmpKTF8Kx/tmp.pdf mentioned in the first line of the error message (cf. the attachment textext_error2.txt) does not exist: the directory tmpKTF8Kx does not show up when I run 'ls -l /tmp'

  3. Pit Garbe repo owner

    Well, the temporary files are always cleared out at the end of the script. But the question remains, whether or not the script actually gets that far or if the files where never there for some reason.

    You could try the following:

    1. Edit the file textext.py that is in your Inkscape extensions folder (since you are o Linux, it should be in ~/.config/inkscape/extensions/) and comment the line 830. That is, replace self.remove_temp_files() with # self.remove_temp_files().

    2. Run the extension again

    3. Look for the temporary files in the location that is in the error message (it's a new location each time)

    Let me know whether or not the files are there now.

  4. Eric Gourgoulhon

    Thanks for your answer. Having commented line 830, I do get files in the tmp directory:

    -rw-rw-r-- 1 eric eric    8 mai    2 14:09 tmp.aux
    -rw-rw-r-- 1 eric eric 5244 mai    2 14:09 tmp.log
    -rw-rw-r-- 1 eric eric 8314 mai    2 14:09 tmp.pdf
    -rw-rw-r-- 1 eric eric    0 mai    2 14:09 tmp.svg
    -rw-rw-r-- 1 eric eric  181 mai    2 14:09 tmp.tex
    

    If I open tmp.pdf, it contains a well typeset 'x', as I asked for via textext. Now, if I run pstoedit on it,

    pstoedit -f plot-svg tmp.pdf tmp.svg -dt -ssp -psarg -r9600x9600 -pta
    

    I get the same error (I am attaching the message in pstoedit_error.txt).

  5. En Petrus

    I have been unable to downgrade ghostscript. I have tried:

    sudo apt install ghostscript=9.18~dfsg~0-0ubuntu2
    

    which should install the 9.18 version but I get the error

    The following packages have unmet dependencies:
     ghostscript : Depends: libgs9 (= 9.18~dfsg~0-0ubuntu2) but 9.18~dfsg~0-0ubuntu2.4 is to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I have been unable to proceed from here. Any suggestion?

  6. another_yekcim

    Apparently the bug is still in Debian Sid.

    Command pstoedit -f plot-svg /tmp/tmpYAGErw/tmp.pdf /tmp/tmpYAGErw/tmp.svg -dt -ssp -psarg -r9600x9600 -pta failed (code 1): pstoedit: version 3.70 / DLL interface 108 (built: Aug 29 2017 - release build - g++ 7.2.0 - 64-bit) : Copyright (C) 1993 - 2014 Wolfgang Glunz
    
     *** WARNING - the DELAYBIND command has been deprecated, and will be
                   removed in the next version. For now you can restore
                   the behaviour by using -dREALLYDEALYBIND but if you
                   require continued use of this command you should contact
                   the Ghostscript developers. Commercial customers of
                   Artifex should email their support contact, free users
                   are encouraged to talk to us on the #ghostscript IRC
                   channel on irc.freenode.net.
    
    Unrecoverable error: undefined in DELAYBIND
    PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS -r9600x9600 "/tmp/psinT51q5a"
    The interpreter seems to have failed, cannot proceed !
    
    Traceback (most recent call last):
      File "/home/carre/.config/inkscape/extensions/asktext.py", line 450, in cb_ok
        self.callback(self.text, self.preamble_file, self.scale_factor)
      File "textext.py", line 207, in <lambda>
        asker.ask(lambda t, p, s: self.do_convert(t, p, s, usable_converter_class, old_node),
      File "textext.py", line 291, in do_convert
        new_node = converter.convert(text, preamble_file, scale_factor)
      File "textext.py", line 942, in convert
        self.pdf_to_svg()
      File "textext.py", line 1018, in pdf_to_svg
        raise RuntimeError(latest_message())
    RuntimeError: Command pstoedit -f plot-svg /tmp/tmpYAGErw/tmp.pdf /tmp/tmpYAGErw/tmp.svg -dt -ssp -psarg -r9600x9600 -pta failed (code 1): pstoedit: version 3.70 / DLL interface 108 (built: Aug 29 2017 - release build - g++ 7.2.0 - 64-bit) : Copyright (C) 1993 - 2014 Wolfgang Glunz
    
     *** WARNING - the DELAYBIND command has been deprecated, and will be
                   removed in the next version. For now you can restore
                   the behaviour by using -dREALLYDEALYBIND but if you
                   require continued use of this command you should contact
                   the Ghostscript developers. Commercial customers of
                   Artifex should email their support contact, free users
                   are encouraged to talk to us on the #ghostscript IRC
                   channel on irc.freenode.net.
    
    Unrecoverable error: undefined in DELAYBIND
    PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS -r9600x9600 "/tmp/psinT51q5a"
    The interpreter seems to have failed, cannot proceed !
    
    • ghostscript: version 9.22
    • pstoedit: version 3.70
  7. Log in to comment