PyMEL tools.loggingControl

101 views
Skip to first unread message

Count Zer0

unread,
Dec 8, 2011, 7:38:24 PM12/8/11
to python_inside_maya
Looks like this may be broken again in 2012, or possible an OSX issue.
I get this when I open the menu:

"
# Error: CallbackError: file /Applications/Autodesk/maya2012/Maya.app/
Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/
site-packages/pymel/internal/factories.py line 744: Error executing
callback <bound method LoggingMenu.refresh of
ui.LoggingMenu('MayaWindow|pymelLoggingControl')> - refresh - module
pymel.tools.loggingControl - /Applications/Autodesk/maya2012/Maya.app/
Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/
site-packages/pymel/tools/loggingControl.py, line 113

Original message:
Traceback (most recent call last):
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
internal/factories.py", line 742, in callback
res = origCallback( *newargs )
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
tools/loggingControl.py", line 121, in refresh
self.refreshLoggingMenu()
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
tools/loggingControl.py", line 35, in refreshLoggingMenu
self.buildSubMenu(self, logging.root)
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
tools/loggingControl.py", line 65, in buildSubMenu
pymel.menuItem(l="Remove", p=parent, ob=True,
c=pymel.Callback(logger.removeHandler, item))
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
internal/factories.py", line 764, in newUiFunc
return beforeUiFunc(*args, **kwargs)
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
internal/factories.py", line 878, in newFuncWithReturnFunc
res = beforeReturnFunc(*args, **kwargs)
File "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/
Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/
internal/pmcmds.py", line 134, in wrappedCmd
res = new_cmd(*new_args, **new_kwargs)
RuntimeError: Option box items must be inserted after valid menu
items. #
"

Geordie Martinez

unread,
Dec 8, 2011, 7:48:20 PM12/8/11
to python_in...@googlegroups.com
if you get the latest from the gitHub it fixes the issue.


Count Zer0

unread,
Dec 13, 2011, 4:36:03 PM12/13/11
to python_inside_maya
I do have latest off of github. I know those paths point to built-in
Maya pymel but it happens from latest 1.0.3 version on Github as well.
The bug fixed in github, referred to in a previous post on this forum:
http://bit.ly/vpCpuh which I found the fix for, is not the same bug.

I know loggingControl menu is rarely used, can anybody confirm it
works for them in latest 2012 w/ latest pymel?

Thanks,

-jason

yu...@sectionstudios.com

unread,
Nov 19, 2015, 2:53:42 PM11/19/15
to Python Programming for Autodesk Maya
Should this be fixed in 2015?
I tryed to use it and getting the similar error

Also is there a tutorial or a help Doc for this feature ?

# Traceback (most recent call last):
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\internal\factories.py", line 779, in callback
# res = origCallback( *newargs )
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\tools\loggingControl.py", line 121, in refresh
# self.refreshLoggingMenu()
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\tools\loggingControl.py", line 35, in refreshLoggingMenu
# self.buildSubMenu(self, logging.root)
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\tools\loggingControl.py", line 65, in buildSubMenu
# pymel.menuItem(l="Remove", p=parent, ob=True, c=pymel.Callback(logger.removeHandler, item))
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\internal\factories.py", line 806, in newUiFunc
# return beforeUiFunc(*args, **kwargs)
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\internal\factories.py", line 947, in newFuncWithReturnFunc
# res = beforeReturnFunc(*args, **kwargs)
# File "C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\internal\pmcmds.py", line 134, in wrappedCmd
# res = new_cmd(*new_args, **new_kwargs)
# RuntimeError: Option box items must be inserted after valid menu items. #
Reply all
Reply to author
Forward
0 new messages