[Maya-Python] PyMel not working in linux

99 views
Skip to first unread message

shawnpatapoff

unread,
May 14, 2010, 8:50:27 PM5/14/10
to python_inside_maya
Hey Everyone,

In linux I have Maya 2009 with the most recent pyMel

I run:
a = polyCube()
a.listAttr()

I get these errors:
# Error: 'list' object has no attribute 'listAttr'
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# AttributeError: 'list' object has no attribute 'listAttr' #
a[0].listAttr()
# Error: 'NoneType' object has no attribute 'parse'
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/core/nodetypes.py", line 468, in listAttr
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/core/nodetypes.py", line 468, in <lambda>
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/core/nodetypes.py", line 1280, in attr
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/core/nodetypes.py", line 356, in attr
# File "/Volumes/VFX/home/shawnpatapoff/key_local_tool_development/
key_base/python/pymel/util/nameparse.py", line 1426, in
getBasicPartList
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/util/objectParser.py", line 367, in __new__
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/util/objectParser.py", line 146, in classparse
# File "/home/shawnpatapoff/key_local_tool_development/key_base/
python/pymel/util/objectParser.py", line 582, in parse
# AttributeError: 'NoneType' object has no attribute 'parse' #

I'm running the OSX as well and it works fine. Is there something I
didnt consider in the linux installation?

Cheers,
Shawn

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

shawnpatapoff

unread,
May 14, 2010, 8:51:49 PM5/14/10
to python_inside_maya
There is a typo at the top please disregard. After a[0].listAttr the
error begins.
--
http://groups.google.com/group/python_inside_maya

Chad Dombrova

unread,
May 17, 2010, 11:50:09 AM5/17/10
to python_in...@googlegroups.com
i've never seen that error before. i can say with confidence that pymel 1.0.2 works with maya 2009 on fedora linux 10, but every linux distro is different. here's something you can do to test the compatibility of your linux against the version of python that comes with maya

extract the pymel 1.0.2.zip
open a terminal and cd to the directory where you extracted it
run mayapy

then from within the running mayapy python interpreter, run this:

import setup
setup.test_dynload_modules()

it will warn you about modules that do not import correctly. if you are missing the version of the lib that maya expects, you should make a symbolic link from an existing version to the missing version. if you need more info there is a section in the docs about doing that.

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

shawnpatapoff

unread,
May 18, 2010, 12:31:47 PM5/18/10
to python_inside_maya
Hey Chad thanks for the reply,

I did as you suggested and get the follow list:

Warning: Could not import module dlmodule: dynamic module does not
define init function (initdlmodule)
Warning: Could not import module _multibytecodecmodule: dynamic module
does not define init function (init_multibytecodecmodule)
Warning: Could not import module parsermodule: dynamic module does not
define init function (initparsermodule)
Warning: Could not import module _localemodule: dynamic module does
not define init function (init_localemodule)
Warning: Could not import module _shamodule: dynamic module does not
define init function (init_shamodule)
Warning: Could not import module rgbimgmodule: dynamic module does not
define init function (initrgbimgmodule)
Warning: Could not import module _testcapimodule: dynamic module does
not define init function (init_testcapimodule)
Warning: Could not import module cryptmodule: dynamic module does not
define init function (initcryptmodule)
Warning: Could not import module fcntlmodule: dynamic module does not
define init function (initfcntlmodule)
Warning: Could not import module timingmodule: dynamic module does not
define init function (inittimingmodule)
Warning: Could not import module selectmodule: dynamic module does not
define init function (initselectmodule)
Warning: Could not import module collectionsmodule: dynamic module
does not define init function (initcollectionsmodule)
Warning: Could not import module itertoolsmodule: dynamic module does
not define init function (inititertoolsmodule)
Warning: Could not import module nismodule: dynamic module does not
define init function (initnismodule)
Warning: Could not import module _md5module: dynamic module does not
define init function (init_md5module)
Warning: Could not import module gdbmmodule: dynamic module does not
define init function (initgdbmmodule)
Warning: Could not import module spwdmodule: dynamic module does not
define init function (initspwdmodule)
Warning: Could not import module _randommodule: dynamic module does
not define init function (init_randommodule)
Warning: Could not import module grpmodule: dynamic module does not
define init function (initgrpmodule)
Warning: Could not import module mmapmodule: dynamic module does not
define init function (initmmapmodule)
Warning: Could not import module cmathmodule: dynamic module does not
define init function (initcmathmodule)

I cd into the /lib64 and the file doesn't exist in any way, no
version. Could I have an odd install going on?

Cheers,
Shawn

Chad Dombrova

unread,
May 18, 2010, 12:34:56 PM5/18/10
to python_in...@googlegroups.com
i've never seen these errors before.  definitely not good.


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

shawnpatapoff

unread,
May 18, 2010, 12:45:55 PM5/18/10
to python_inside_maya
We're running fedora 8, could that be an issue?

On May 18, 9:34 am, Chad Dombrova <chad...@gmail.com> wrote:
> i've never seen these errors before.  definitely not good.
>

Chad Dombrova

unread,
May 18, 2010, 12:50:52 PM5/18/10
to python_in...@googlegroups.com
i have no idea what maya 2009 is certified to run on. we're on fedora 10.  you haven't been messing with maya's python install in any way, have you?
--
http://groups.google.com/group/python_inside_maya

shawnpatapoff

unread,
May 18, 2010, 1:01:10 PM5/18/10
to python_inside_maya
Not to my knowledge, though the previous IT guy really loved linking
things a lot. We're going to get fedora 10 installed here and probably
migrate everyone to it.

On May 18, 9:50 am, Chad Dombrova <chad...@gmail.com> wrote:
> i have no idea what maya 2009 is certified to run on. we're on fedora 10.
>  you haven't been messing with maya's python install in any way, have you?
>

shawnpatapoff

unread,
May 19, 2010, 2:01:27 PM5/19/10
to python_inside_maya
So not sure what's going on here. We installed a brand new maya 2009
with a brand new fedora 10...copy the pymel dir to the desktop, cd
into and get the same results. Is there any way to hunt down wtf is
going on? Any tips?

Cheers,
Shawn

Chad Dombrova

unread,
May 19, 2010, 2:05:09 PM5/19/10
to python_in...@googlegroups.com
you're certain all your environment variables are setup right for mayapy?  this is what i'm getting with maya 2009 on fedora 10:

ws-050: /Volumes/luma/_globalSoft/dev/chad/python/pymel chad$ mayapy
Python 2.5.1 (r251:54863, Jun  5 2007, 12:01:59)
[GCC 4.1.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import setup
>>> setup.test_dynload_modules()
/usr/autodesk/maya2009-x64/lib/python2.5/lib-dynload
testing Maya python installation for missing system libraries
Warning: Could not import module _bsddb: libdb-4.2.so: cannot open shared object file: No such file or directory. create a symbolic link pointing to an existing version of this lib
Warning: Could not import module _tkinter: libtk8.4.so: cannot open shared object file: No such file or directory. create a symbolic link pointing to an existing version of this lib
['_bsddb', '_tkinter']

two bad modules, but none of that init stuff that you had.

-chad



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

shawnpatapoff

unread,
May 19, 2010, 2:54:45 PM5/19/10
to python_inside_maya
Hey Chad,

Looks like we got it figured. On closer inspection of the help docs we
were not running mayapy correctly. So now we have it working properly
on fedora 10. Thanks for the help
Reply all
Reply to author
Forward
0 new messages