Menu

#107 raised StopIteration Error in setNearestStPoint on import of dxf file

Fixed
nobody
None
High
Defect
2019-10-12
2019-07-17
No

Traceback (most recent call last):
File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line 610, in abs_iter
raise StopIteration()
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "dxf2gcode.py", line 719, in open
self.load()
File "dxf2gcode.py", line 866, in load
self.makeShapes()
File "dxf2gcode.py", line 914, in makeShapes
self.makeEntityShapes(self.entityRoot)
File "dxf2gcode.py", line 988, in makeEntityShapes
tmp_shape.AnalyseAndOptimize()
File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line 171, in AnalyseAndOptimize
self.setNearestStPoint(Point())
File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line 187, in setNearestStPoint
key=lambda geo:
RuntimeError: generator raised StopIteration
[1] 27179 abort python3 dxf2gcode.py

Related

Tickets: #107

Discussion

  • chrisko

    chrisko - 2019-07-18

    Please add the file

    Reginald Marr reggiemarr@users.sourceforge.net schrieb am Mi., 17. Juli
    2019, 11:27:


    Status: New
    Created: Wed Jul 17, 2019 06:26 PM UTC by Reginald Marr
    Last Updated: Wed Jul 17, 2019 06:26 PM UTC
    Owner: nobody

    Traceback (most recent call last):
    File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line
    610, in abs_iter
    raise StopIteration()
    StopIteration

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "dxf2gcode.py", line 719, in open
    self.load()
    File "dxf2gcode.py", line 866, in load
    self.makeShapes()
    File "dxf2gcode.py", line 914, in makeShapes
    self.makeEntityShapes(self.entityRoot)
    File "dxf2gcode.py", line 988, in makeEntityShapes
    tmp_shape.AnalyseAndOptimize()
    File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line
    171, in AnalyseAndOptimize
    self.setNearestStPoint(Point())
    File "[dxflocation]/dxf2gcode-20190103/dxf2gcode/core/shape.py", line
    187, in setNearestStPoint
    key=lambda geo:
    RuntimeError: generator raised StopIteration
    [1] 27179 abort python3 dxf2gcode.py


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/dxf2gcode/tickets/107/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Tickets: #107

  • Martin Oppermann

    I am having the same problem on my SuSe Linux system since the last update.
    Before that, I have used dxf2gcode many years without trouble.
    Problem also occurs with an older (2016) version of dxf2gcode.
    Can I do anything to assist you in removing this prolem?
    Thanks,
    Martin

     
  • chrisko

    chrisko - 2019-08-05

    I am not sure where this issue is coming from. I commented the lambda function out. Please try to replace the file shape.py with the attached one and give me feedback if that works or the new failure message you get.
    Christian

     

    Last edit: chrisko 2019-08-05
  • Martin Oppermann

    Hi Christian,
    thanks for the file,
    I tried the attached shape.py, but no success: same error message (attached).
    best regards,
    Martin

     
  • chrisko

    chrisko - 2019-08-07

    Stange, this part of the file should be commented out. Now i created a new one, which fully commented it out.
    Please try again and ensure that you overwrite the existing shape.py.
    regards
    Christian

     
  • Martin Oppermann

    Hi Christian,
    thanks, but still the same... (error message attached).
    regards,
    Martin

     
    • chrisko

      chrisko - 2019-08-07

      OK, i still don't understand it. Can you please check your python version and pyQT version. You may run a too new one. Please try to deinstall and run with the versions described in the README ( A short snapshot of the important ones ....)

      • Runtime dependencies:

        • /usr/bin/python3 (>=3.5),
        • PyQt5 (>=5.7),
        • PyOpenGL (>=3.1),
        • configobj (>=5.0.6),
        • /usr/bin/pdftops (>=0.45),
        • /usr/bin/pstoedit (>=3.70).

        Note: Depending you used operating system flavour different package names
        might provides required dependencies...

        Note: Please do not install python3 version 3.7.x as at the time of writing
        there is no pyqt5-tools package available for this version of the python.

       
  • Martin Oppermann

    Ok, I will try that on monday.
    I have to find out how to downgrade python from 3.7 to 3.5 on tumbleweed.
    Seems to be not so easy, only the newest packages are available with direct acccess to the repo via YAST.
    Thanks and best regards,
    have a nice weekend,
    Martin

     
  • Martin Oppermann

    Hi Christian,

    sorry for the delay... The last weeks I tried to downgrade python to 3.5 on my SuSE Tumbleweed, but without success. It seems, only the newest packets are availale for tumbleweed. So I tried to install python 3.5 manually. That python version alone is running well, but it will not find the matching python toolkit things like Qt5 OpenGL etc. And for also manually installing these additional things, I don't have the knowledge (or the time to find out how everything fits together).

    So it seems, I am lost :-(

    Or do you have any other idea how to make dxf2gcode running on tumleweed?

    Ain't there a possibillity in linux to make a dxf2gcode package including all needed libraries so it doesn't have to use anything that is outside its own environment?

    Thanks,
    regards,
    Martin

     
  • Nick

    Nick - 2019-09-27

    Martin,
    I was able to get it to run on 3.7 with a small edit in Shape.py. On line 605 where it calls "raise StopIteration()" I simply commented that out and called "return" and it's working.

     
  • Martin Oppermann

    Hi Nick,
    thanks for the hint, I just tried it.
    It then crashes inside layercontent.py when saving the gcode file..... :-(

    But I also commented out the StopIteration there (line 148 and 155), and then it seems to work.
    No idea if this solution makes problems under some circumstances, but it works for the moment.....

     
  • Damian Wrobel

    Damian Wrobel - 2019-10-12
    • status: New --> Fixed
     

Log in to post a comment.