Menu

SVG import error

Help
2010-10-03
2023-06-02
  • Jonathan MacWilliams

    Hi - I have just installed the latest and greatest.  I have also included all the dependancies that are listed in the Wiki

    When I try to open the SVG file that is included in the package I get this error on the bottom of the main pycam screen.

    "failed to convert EPS file (/tmp/tmpPm3VYW.eps) to DXF file (/tmp/tmpF02EQC.dxf): pstoedit: version 3.50 /DLL….."

    Any ideas how to fix this?

    Thanks

    Jonathan

     
  • Lars

    Lars - 2010-10-03

    Hi jmacwill,

    sadly, I did not write down the instructions for preparing a usable SVG for pycam, yet. This will be done before the next release …

    The main requirement is, that you need to convert your objects into paths (see the "Path" menu). Additionaly you should remove all "stroke" properties from the paths (if they exist).

    If this does not help, then you could send me your SVG file via my sourceforge mail address, so I could investigate the issue.

    cheers,
    Lars

     
  • Jonathan MacWilliams

    Hi Lars

    Thanks for the reply - you actually have the file - it is one of the sample files included in the download.  I wanted to try it first to see what the output looked like before I went tackling my own file - as I know inkscape can be "particular".

    I figured if the file was included with the package it would be a good file and able to be processed.

    Thanks

    Jonathan

     
  • Lars

    Lars - 2010-10-04

    Hi Jonathan,

    ok - now I got. I guess, you used the file polygons.svg in the "samples" directory.
    I just tried to open this file with PyCAM v0.3 under Linux and Windows XP. Both worked without a problem.
    Did you configure the right location of the "inkscape" program in PyCAM? (see "Settings -> Preferences -> Programs")
    Which version of inkscape is installed? (here: v0.47)
    Is there any other message in the PyCAM log? (see "Windows -> Log Window")

    thanks for your feedback!
    cheers,
    Lars

     
  • Jonathan MacWilliams

    Hi Lars

    I am indeed running inkscape 0.47

    I installed PStoedit and assured the links were good to both (good thing I checked - they were not linked correctly)

    Still have the error

    19:29 INFO Imported STL model: 75 vertices, 115 edges, 46 triangles
    19:29 INFO Successfully converted SVG file to EPS file
    19:29 WARNING SVGImporter: failed to convert EPS file (/tmp/tmpmRpKeE.eps) to DXF file (/tmp/tmpLtkSBy.dxf): pstoedit: version 3.50 / DLL interface 108 (build Jan 25 2010 - release build - g++ 4.4.3) : Copyright (C) 1993 - 2009 Wolfgang Glunz

    Thanks for your help

    Jonathan

     
  • Lars

    Lars - 2010-10-07

    Hi Jonathan,

    I can't imagine what causes this problem.
    But we can try to debug it - if you would want to help me …

    Maybe try to apply two two lines to the file "src/pycam/Importers/SVGImporter.py":

    --- pycam/Importers/SVGImporter.py      (Revision 621)
    +++ pycam/Importers/SVGImporter.py      (Arbeitskopie)
    @@ -94,6 +94,8 @@
         os.close(eps_file_handle)
         success = convert_svg2eps(filename, eps_file_name, location=inkscape_path)
         def remove_temp_file(filename):
    +        log.warn("Keeping temporary file: %s" % str(filename))
    +        return
             if os.path.isfile(filename):
                 try:
                     os.remove(filename)
    

    This would skip the deletion of the temporary files (eps and dxf). You could try to open these files (after running the import again) or just send them to my sourceforge mail-address.

    thanks in advance!
    Lars

     
  • Andrew Bromwich

    Andrew Bromwich - 2010-10-10

    Hi Lars,

    Not sure if it helps or not, but I'm having the same issue. Trying to load other SVG or the polygon file in the sample folder. From the console it appears as if the conversion to DXF is working but the call to check if the process has succeeded or not is happening before the program actually runs?

    Imported STL model: 75 vertices, 0 edges, 46 triangles
    Successfully converted SVG file to EPS file
    SVGImporter: failed to convert EPS file (/tmp/tmpSffBlw.eps) to DXF file (/tmp/tmpkCA4m1.dxf): pstoedit: version 3.50 / DLL interface 108 (build Jan 25 2010 - release build - g++ 4.4.3) : Copyright (C) 1993 - 2009 Wolfgang Glunz

    I was able to import all files by bypassing the success check in convert_EPStoDXF

    I hope this helps find the cause of the problem. I'm not experienced in coding in python so sorry I can't be of more help!

    Cheers,

    Andrew

     
  • Lars

    Lars - 2010-10-11

    Hi Andrew,

    thanks a lot for taking the time to find this workaround!

    This problem seems to hit all users of Ubuntu 'lucid'. The respective version of 'libpstoedit0c2a' (2.6-0ubuntu3) causes a negative exit code for pstoedit even in case of success.
    I am using Debian, thus I did not notice this before.

    Now I relaxed the "success" check in the eps->dxf converter to emit a helpful warning if this problem is detected.
    You can get around this problem by switching to the 'maverick' repository and installing 'libpstoedit0c2a' from there.
    (or you just update to the lastest version in svn)

    @Jonathan: does this fix your problem, as well?
    @Andrew: thanks!

    cheers,
    Lars

     
  • Nobody/Anonymous

    Hi everybody!

    Just came across the whole toolchain gimp-inkscape-pycam-emc² and I'm pretty impressed - excellent work,
    thanks for your efforts!
    I just happen to have problems opening svgs with the windows standalone versions 0.5 and 0.5.1.1
    (kind of limited to the OS here since on the road with only corporate equipment ).
    I keep getting "DXFImporter: No supported elements found in DXF file!" no matter what I do during pre-processing
    with inkscape 0.48.1.0 (yep, read and followed the hints for paths and fill).
    Since the same message pops up upon trying to open the svgs that came with the pycam package I was wondering
    whether the root cause could be on the pycam side…
    Gonna try to set up the whole toolchain in the latest emc² ubuntu ASAP (christmas…) and highly appreciate any hints
    to get the standalone going for my youth-science-projects and out of pure interest in the meantime.
    STL imports/files work flawlessly by the way…
    In any case: thanks for your help already now,

    no matter what the rest of them say - you rock!

     
  • Lars

    Lars - 2011-12-04

    Hi nobody,

    this issue sounds weird - I just tried to open all svg models contained in the "samples" directory of v0.5.1 and everything worked as expected (running PyCAM v0.5.1).
    Did you install all programs (inkscape, pstoedit, ghostscript) listed in the section "optional external programs for Windows"? (http://sourceforge.net/apps/mediawiki/pycam/index.php?title=Requirements#Windows_2)

    Alternatively you could use the installer package of PyCAM. This allows you to run PyCAM from a terminal window - there you will see any potential warnings or errors issued by the conversion programs. Usually regular errors should be reported by PyCAM, but maybe the converters don't report errors in an appropriate way.

    hope this helps,
    Lars

     
  • Nobody/Anonymous

    Hi sumpfralle,

    I stumbled into similar problems as described in this thread.
    When importing a SVG file I get the following error message:
    eps_filename: %s; svg_filename: %s ('/tmp/tmpoS6UVM.eps', '/usr/local/share/pycam/samples/polygons.svg')
    Successfully converted SVG file to EPS file
    Returncode: 127
    SVGImporter: failed to convert EPS file (/tmp/tmpoS6UVM.eps) to DXF file (/tmp/tmpvwmN_f.dxf): pstoedit: version 3.50 / DLL interface 108 (build Dec  4 2011 - release build - g++ 4.5.2) : Copyright (C) 1993 - 2009 Wolfgang Glunz
    error in mkstemp for psinxKDIe7 13
    Inconsistency detected by ld.so: dl-close.c: 737: _dl_close: Assertion `map->l_init_called' failed!

    I have added the Returncode debug message.

    I'm using Mint Linux 11.

    Regards,
       Stefan.

     
  • Nobody/Anonymous

    Hi all,

    Just an update on the SVG import issue.
    I've installed pyCam on my Laptop, running the same system (Linux Mint 11) but with a different Kernel (3.0) and everything works fine. The only difference to the system where its not working is the Kernel and that I have installed tuxplot on the system where I have the problems with the SVG import.
    Tuxplot applies some changes to the system including the pstoedit and the libpstoedit0c2a. I have uninstalled tuxplot and reinstalled the original pstoedit and libpstoedit0c2a, but still can't import SVGs.
    I'll try to find out if tuxplot has made some more changes which I haven't been removed when uninstalling tuxplot.

    Regards,
       Stefan.

     
  • Lars

    Lars - 2011-12-05

    Hi Stefan,

    I was search a bit for the above error message ("Inconsistency detected by ld.so: dl-close.c …"). It was usually mentioned in connection with Octave. But this should not be related to your problem, I guess.

    Please keep us updated!

    cheers,
    Lars

     
  • Nobody/Anonymous

    Once more hi everybody!

    Thanks a lot for your comments regarding the problem about the "DXFImporter: No supported
    elements found in DXF file!"-message.

    So far I tried to run the show with inkscape in the portable version in a package including also the pstoedit
    (can be found on portableapps by searching for "pstoedit portable" - should link to a post with a 160 meg zip
    download) and alternatively also tried with the pstoedit installed - same result.
    Ghostscript is installed (running FreePDF which also requires ghostscript since several months without any problems).
    I have come to the point where I prefer to run as much as possible in portable versions since I work on different
    machines (mainly laptops) - this is also why I highly appreciate the standalone version so much.
    Pointing pycam to the applications (inkscape and pstoedit) though wasn't a problem at all and did not result in any
    complaints - upon trying to open an svg I can see the portable-apps-inkscape-logo coming up so I have reason
    to believe that pycam routes the call correctly and successfully. (As mentioned before the stls work without any
    worries in the above mentioned configurations.)
    However, I'll keep tinkering around a bit and keep you posted about new inspirations on my side. If nothing else
    I'll go to the full installation strategy on the workshop machine that is supposed to run the cnc equipment - won't
    be any earlier than in a few weeks though…

    Anyway - as I mentioned before: thank you very much for your support.

    Gonna keep you posted about any new developments here on my side…

    best regards

    Dolphi

     
  • Nobody/Anonymous

    Hey everybody,

    as promised hereby the last developments on the "DXFImporter: No supported elements found in DXF file!"-problem:
    got my hands on a different machine and the whole show works like a charm even with the complete
    portable package on the inkscape and pstoedit side mentioned above.

    Differences on the two notebooks are too many to inquire any deeper - just to mention a few:
    - less user rights on the 3 year old Dell (dual core 2.0 GHz)  that the software works on
      (only power user instead of admin on the problematic 'only 2' years old Toshiba, dual core 2.6 GHz)
    - more recent OS updates  (Windows XP Pro) on the Toshiba than on the Dell (same OS though)
    -different software packages on both (M$Office in different versions, VPN-client on the Dell etc.)

    Suppose it's not exactly worth digging any deeper and wouldn't wanna impose based on this very specific problem.
    Just for the records: would actually have expected difficulties on the software-wise more restrictive Dell…

    What might be interesting though is the fact that with the above mentioned portable Inkscape package
    (http://portableapps.com/node/28897) the whole toolchain should porbably work without any installations
    on this and the pstoedit side on a windows machine.
    Since ghostview along with FreePDF as mentioned is installed on both machines I'm not too sure about the pycam
    requirements and the portability on that side. However - it's apparently also in that referred to package.
    In addition to this there seem to be further ways to portabilize it:
    http://www.portablefreeware.com/forums/viewtopic.php?p=9475

    Anyway - despite not really getting to the bottom and root cause of the original problem at least we learned something…

    Cheers, Merry Christmas and a Happy New One to everybody….

    Dolphi

     
    • kingf

      kingf - 2023-06-02

      Even PyCam 0.5.1.1 is still one of the best G-Code path generators available today.
      SO... to get PyCam to work in windows (tested upto windows 10), you need:
      gs955w32.exe: 9.55.0 is the LAST Ghost Script supported by PStoEDIT (addresses DXF error)
      pstoeditsetup_win32.exe: 3.78 latest available
      inkscape-0.92.5-x64.msi: light weight release (newer versions work)
      pycam-0.5.1.1_standalone.exe: Star of the show :)

      (you "might" also need VC_redist.x86.exe= Microsoft Visual C++ Redistributable )
      
       
  • Nobody/Anonymous

    I got same problem.  Ghostscript (http://sourceforge.net/projects/ghostscript) instalation helped.
    Windows XP SP3 32bit

     
  • Nobody/Anonymous

    I don't like to reanimate old posts, but since I had the same problem as nobody, I think that my solution could help someone else.
    I try to used the last version of pyCAM on windows7 64bit machine.
    I used the standalone version.
    I used the portable versione of Inksacpe 0.48.1
    Installed pstoedit 32bit
    Installed imageMagic (ImageMagick-6.7.6-7-Q8-windows-dll) (this needed to restart Win to take effect).
    The problem was present both with a custom made SVG and with the one provided with pyCAM and was:
    "DXFImporter: No supported elements found in DXF file".
    it was corrected installing GhostView  ( Ghostscript 9.05 for Windows (32 bit) )
    Thanks to everyone on this useful thread!

     
  • Nobody/Anonymous

    There is a problem with your svg.
    Aside: Why not use PyCAM with Ubuntu? You could live happy.

     

Log in to post a comment.