Hmm... namedCommandSetup.mel is a file in the maya user profile - what happens if you wipe your user settings dir? You can just rename it temporarily (Note - on windows, you may need to make sure that "Autodesk Application Manager" is not running in the background before it will let you rename your maya dir...):
(shell prompt) > mv %USERPROFILE%\Documents\maya %USERPROFILE%\Documents\maya.bak (shell prompt) > "C:\Program Files\Autodesk\Maya2014\bin\mayapy" (mayapy prompt) >>> import pymel.core as pm ... (shell prompt) mv %USERPROFILE%\Documents\maya.bak %USERPROFILE%\Documents\maya Does it still give the same error? On Sun, Sep 21, 2014 at 3:37 AM, tushar sankhala <[email protected]> wrote: > Hi, > > I tried what you suggested, i tried executing: > > import pymel.core without the maya.standalone.initialize() > > and it worked but with one error > > *pymel.internal.startup : ERROR : could not perform Maya initialization > sequence:* > * failed on namedCommandSetup.mel: Error occurred during execution of MEL > script* > > i have found out there is a problem with the* "about"* module in the* > maya.cmds* > > confusion is if i run i*n mayapy.exe:* > > First try: > *>>> import maya.cmds as mc* > *>>> mc.about* > > *Traceback (most recent call last):* > * File "<stdin>", line 1, in <module>* > *AttributeError: 'module' object has no attribute 'about'* > > Second try: > > Restarted* mayapy* > > >>> import pymel.core as pmc > > pymel.internal.factories : INFO : MFnDagNode.model is deprecated > Warning: file: D:/Program > Files/Autodesk/Maya2014/scripts/startup/initialStartup > .mel line 192: Y-axis is already the Up-axis > pymel.internal.startup : ERROR : could not perform Maya initialization > sequence: > failed on namedCommandSetup.mel: Error occurred during execution of MEL > script > > >>> mc.about > <built-in method about of module object at 0x0000000002805678> > > so now it is able to find the* about *module in* maya.cmds* if i impor*t > pymel.core *before* maya.cmds* > > *Can some one tell what is the issue.* > > *Thanks* > > On Sunday, 21 September 2014 06:43:59 UTC+5:30, elrond79 wrote: >> >> Interesting... That should work, so I'll take a look when I'm at a >> computer with Maya, but as a workaround, what happens if you just do >> "import pymel.core" without the maya.standalone.initialize()? >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/5e6367b3-c59e-4395-9094-ad8611207964%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/5e6367b3-c59e-4395-9094-ad8611207964%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAssL7b2KbPjK1T2dBQLKYHkn0MHMTLSSOYfWL3LmyH2MEextA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
