bugpyFormex - Bugs: bug #37403, startup error

 
 

bug #37403: startup error

Submitted by:  Sofie Van Cauter <svcauter>
Submitted on:  Thu 20 Sep 2012 08:18:27 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Fatal ErrorStatus: Fixed
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 20 Sep 2012 03:18:46 PM UTC, comment #6:

Temporarily fixed in revision 2445 (reverting changes from2440)

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 20 Sep 2012 03:07:29 PM UTC, comment #5:

Oh! I tought the error was in the import statement. But this is clearly int the script executing. I managed to replicate the problem. It was solved by adding
'from pyformex.gui.draw import *'
in the script. This is saner than gui.draw anyways.

BTW. This problem revealed that errors in the startup script may crash pyFOmrex. You can debug these errors by moving it and running it as a normal script. But we should implement some
error recovery here.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 20 Sep 2012 01:37:26 PM UTC, comment #4:

It seems that I get an error when my startup script is run.
I don't get the error when I use "from main import run"

Traceback (most recent call last):
File "/home/sofie/pyformex/pyformex/gui/draw.py", line 1382, in play

runAny(step=step,refresh=refresh)
File "/home/sofie/pyformex/pyformex/script.py", line 530, in runAny

return runScript(appname,argv)
File "/home/sofie/pyformex/pyformex/script.py", line 436, in runScript

res = playScript(file(fn,'r'),fn,fn,argv,pye)
File "/home/sofie/pyformex/pyformex/script.py", line 330, in playScript

exec scr in g
File "/home/sofie/landmarkdb/anatomical.py", line 31, in <module>

renderMode('smooth')
File "/home/sofie/pyformex/pyformex/gui/draw.py", line 1208, in renderMode

toolbar.updateNormalsButton()
File "/home/sofie/pyformex/pyformex/gui/toolbar.py", line 272, in updateNormalsButton

updateButton(normals_button,'avgnormals')
File "/home/sofie/pyformex/pyformex/gui/toolbar.py", line 207, in updateButton

button.setChecked(vp.settings[attr])
AttributeError
:
'NoneType' object has no attribute 'setChecked'

Sofie Van Cauter <svcauter>
Project Member
Thu 20 Sep 2012 01:15:05 PM UTC, comment #3:

Strange, your paths look just like mine. Except that I use python 2.7. Could there be the reason?

What error do you get exactly?

Anybody else getting a startup error?

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 20 Sep 2012 11:52:54 AM UTC, comment #2:

I get the following printout:

pyformex_path = /home/sofie/pyformex/pyformex

bindir = /home/sofie/pyformex/pyformex

sys.path before = ['/home/sofie/pyformex', '/home/sofie/pyformex/pyformex', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/pymodules/python2.6/gtk-2.0']

sys.path after = ['/home/sofie/pyformex/pyformex', '/home/sofie/pyformex', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/pymodules/python2.6/gtk-2.0']

Sofie Van Cauter <svcauter>
Project Member
Thu 20 Sep 2012 10:47:15 AM UTC, comment #1:

I had to add it to make it work for installed packages.
And on my systems it works for the svn version too.
It looks like in your case the sys.path is set differently than the two cases provided for in the pyformex startup script.
Check the manipulaton of sys.path.

I have added extra printout for that purpose in revision 2443.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 20 Sep 2012 08:18:27 AM UTC, original submission:

The line "from pyformex.main import run" causes a startup error in revision 2440.

I'm not sure however if it may be changed back to "from main import run".

Sofie Van Cauter <svcauter>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by svcauter (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Sep 2012 03:24:54 PM UTCbverhegStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 20 Sep 2012 03:07:29 PM UTCbverhegSeverity5 - Blocker=>3 - Normal
      StatusNone=>Confirmed
    Thu 20 Sep 2012 10:47:15 AM UTCbverhegSeverity3 - Normal=>5 - Blocker
      Item GroupFunctionality error=>Fatal Error

    Back to the top


    Powered by Savane 3.1-cleanup1