Menu

Need help getting it to run

Help
2008-08-31
2013-03-08
  • Brendan Erwin

    Brendan Erwin - 2008-08-31

    I'm using OS X 10.5 with macports.

    I seem to have gotten past all the dependancies, but now its failing trying to load itself... Here is what I'm getting:

    [11:17:12] Miracle-Max:$ /opt/local/bin/python2.5 Gui/Visualization.py
    File "Gui/Visualization.py", line 12, in <module>
        from pycam.Geometry.utils import *
    ImportError: No module named pycam.Geometry.utils

    OR

    [11:17:28] Miracle-Max:$ /opt/local/bin/python2.5 Gui/SimpleGui.py
    Traceback (most recent call last):
      File "Gui/SimpleGui.py", line 11, in <module>
        from pycam import *
    ImportError: No module named pycam

    Any help?

     
    • Brendan Erwin

      Brendan Erwin - 2008-08-31

      Already I see what is probably the root of the problem.

      I did a svn co and it has pycam.py whereas the release package does not.

       
    • Brendan Erwin

      Brendan Erwin - 2008-08-31

      Talking to myself here. :)

      Now it's failing with "Bus Error" which I believe is a SegFault. I'm not sure how to go about working this problem.

      [11:34:03] Miracle-Max:$ python -vd pycam.py
      ...A Bunch of Stuff...
      import pycam.Exporters.MGEDExporter # precompiled from /Users/brendanjerwin/Projects/pycam/pycam/Exporters/MGEDExporter.pyc
      # /Users/brendanjerwin/Projects/pycam/pycam/Exporters/SimpleGCodeExporter.pyc matches /Users/brendanjerwin/Projects/pycam/pycam/Exporters/SimpleGCodeExporter.py
      import pycam.Exporters.SimpleGCodeExporter # precompiled from /Users/brendanjerwin/Projects/pycam/pycam/Exporters/SimpleGCodeExporter.pyc
      # /Users/brendanjerwin/Projects/pycam/pycam/Exporters/gcode.pyc matches /Users/brendanjerwin/Projects/pycam/pycam/Exporters/gcode.py
      import pycam.Exporters.gcode # precompiled from /Users/brendanjerwin/Projects/pycam/pycam/Exporters/gcode.pyc
      Bus error

       
      • Lode Leroy

        Lode Leroy - 2008-09-01

        thanks for reporting the missing file. I added it and posted a new release.
        as for the crash, I have no idea what causes it...
        you could try deleting all *.pyc files and try again.

        maybe try first to get some other Tk/TOGL/PyOpenGL based program to run and see if that works

         
        • Brendan Erwin

          Brendan Erwin - 2008-09-05

          I'm able to get the PyopenGl demos to run.

          I have found the line that is failing:

          SimpleGUI.py -

          class OpenglWidget(Opengl):
              def __init__(self, master=None, cnf={}, **kw):
                  print "in OpenglWidget __init__"
                  Opengl.__init__(self, master, kw)
                  print "after Opengl.__init__"

          I never get "after Opengl.__init__" to print, just the "Bus Error" message.

          Does this mean anything to you?

           
          • Lode Leroy

            Lode Leroy - 2008-09-05

            did you compile PyOpenGL and TOGL yourself?
            if not, I would suggest trying that first...

             
    • Brendan Erwin

      Brendan Erwin - 2008-09-05

      I got it to work in Ubuntu. I'd say for now it just doesn't work on OS X.

       
    • michael tilse

      michael tilse - 2009-02-04

      Hi, new here.

      I'm trying to run pycam.

      On Ubuntu 8.04 LTS.

      I've installed tcl/tk, togl, etc.

      when I try to run pycam.py I get this: (A window pops up and then disappears, then I get this message on the command line)

      xxxxxx@shuttle:~/Desktop/pycam-0.1.7$ python pycam.py
      freeglut  ERROR:  Function <glutStrokeCharacter> called without first calling 'glutInit'.

      Can you help me out with this?

      Thank you.

      Michael

       
      • Lode Leroy

        Lode Leroy - 2009-02-05

        Hi Michael ,
        thanks for trying out pycam, and for reporting this bug.

        you can either update to the latest svn version (41),
        (http://pycam.svn.sourceforge.net/viewvc/pycam/trunk/pycam.tar.gz?view=tar)
        or fix it yourself:

        You need to add glutInit() on line 25 in pycam/Gui/SimpleGui.py

        here is the diff....

        Index: pycam/Gui/SimpleGui.py

        --- pycam/Gui/SimpleGui.py      (revision 40)
        +++ pycam/Gui/SimpleGui.py      (revision 41)
        @@ -22,6 +22,7 @@
        class OpenglWidget(Opengl):
             def __init__(self, master=None, cnf={}, **kw):
                 Opengl.__init__(self, master, kw)
        +        glutInit()
                 glShadeModel(GL_FLAT)
        #        glShadeModel(GL_SMOOTH)

         

Log in to post a comment.