I inadvertently fixed this when upgrading to 1.0.2.

My previous scripts were importing pymel like so

*from pymel import **

Now it seems the lazy loading is saving me

*import pymel.core as pm*

I don't execute anything in my userSetup.py if I'm not in interactive mode
either

*import maya.OpenMaya as om
if om.MGlobal.mayaState() == om.MGlobal.kInteractive:
    ... execute stuff *...





On Wed, Mar 31, 2010 at 12:50 PM, David Moulder <[email protected]>wrote:

> I did this for our module system recently.  I ended up installing
> sphinx for mayapy.exe,  I don't have sphinx here at home but I had to
> setup the config file that sphnix uses to add all the relevant
> sys.paths.
>
> See this post for more info from chad
>
>
> http://www.mail-archive.com/[email protected]/msg02466.html
>
> -Dave
>
>
> On Wed, Mar 31, 2010 at 6:33 PM, Justin Rosen <[email protected]>
> wrote:
> > Hey Chad,
> >
> > I was wondering if you were doing anything special when building the
> pymel
> > Sphinx docs.  I've developed an automated doc system with Sphinx here at
> our
> > studio.  I'm having issues with python code that imports pymel.  We're
> still
> > using 0.9.2.  If I put a try/except around the pymel import Sphinx seems
> to
> > build okay.
> >
> > I always get this warning.
> > pymel.mayahook.mayautils : WARNING : Unable to open
> > '/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/mayaApi2008.2.07.bin' for
> > reading the API cache: [Errno 2] No such file or directory:
> > '/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/mayaApi2008.2.07.bin'
> >
> > We have an XML based tool/application wrapper that modifies the
> environment
> > before a tool runs.  In the case of running Sphinx I load up the Maya
> > 2008.2.07 with pymel.  How is this name being derived
> > /data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/mayaApi2008.2.07.bin?  Our
> > wrappers don't actually rename the maya executable, the installed
> > applications are fresh out the box.
> >
> > With the pymel imports I get the following
> > Exception occurred:
> >   File
> "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/api/conversions.py",
> > line 1143, in _buildApiTypeHierarchy
> >     maya.cmds.loadPlugin( x )
> > RuntimeError: Plug-in, "buildRotationNode.cpp.so", was not found on
> > MAYA_PLUG_IN_PATH.
> >
> > Partial traceback...
> > File
> >
> "/tmp/TOOLS_INSTALL/cent5_x86_64/MayaUtils-Project/MayaUtils/library/python/menuUtils.py",
> > line 8, in <module>
> >     from pymel import *
> >   File "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/__init__.py", line
> > 1473, in <module>
> >     import api
> >   File "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/api/__init__.py",
> > line 13, in <module>
> >     from conversions import *
> >   File
> "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/api/conversions.py",
> > line 1316, in <module>
> >     apiTypeHierarchy, apiClassInfo, apiToMelData, apiClassOverrides =
> > _buildApiCache(rebuildAllButClassInfo=False)
> >   File
> "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/api/conversions.py",
> > line 1265, in _buildApiCache
> >     apiTypeHierarchy, apiTypesToApiClasses, apiClassInfo =
> > _buildApiTypeHierarchy(apiClassInfo=apiClassInfo)
> >   File
> "/data/app/cent5_x86_64/Pymel/0.9.2/pymel/pymel/api/conversions.py",
> > line 1143, in _buildApiTypeHierarchy
> >     maya.cmds.loadPlugin( x )
> > RuntimeError: Plug-in, "buildRotationNode.cpp.so", was not found on
> > MAYA_PLUG_IN_PATH
> >
> > with try/except around pymel imports produces documenation.  I haven't
> dug
> > to deep into this, thought I'd ping you first.
> >
> > Thanks
> > Justin
> >
> >
> > --
> > http://groups.google.com/group/python_inside_maya
>
>
>
> --
> David Moulder
> http://www.google.com/profiles/squish3d
>
> --
> http://groups.google.com/group/python_inside_maya
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to