Error: <function selCom at 0x7f29c5c04aa0>;

Error: <function selCom at 0x7f29c5c04aa0>;

info
Contributor Contributor
25,777 Views
34 Replies
Message 1 of 35

Error: <function selCom at 0x7f29c5c04aa0>;

info
Contributor
Contributor

Hi all, I got a few object in a scene, when I try to select some of them in outliner  I receive the following error

select -r HairBasefrom_Zbrush03 ;
// Error: <function selCom at 0x7f29c5c04aa0>; //
// Error: Line 1.1: Syntax error //

 

I have try to export in fbx and re import in a fresh new scene/ optimize the scene / delete history

nothing happen.

thx

 

edit. I noticed that's happen if I create a cube in a new scene.. help

cube.jpg

Accepted solutions (1)
25,778 Views
34 Replies
Replies (34)
Message 2 of 35

mspeer
Consultant
Consultant

Hi!

 

Try a reset of your preferences.
Rename the folder prefs in folder 2019 to something like prefs_backup, or to reset everything, the folder 2019 to 2019_backup (or even the maya folder to maya_backup). Maya creates new folders (don't copy preferences from previous Maya versions). Detailed at:
https://knowledge.autodesk.com/support/maya/troubleshooting/caas/sfdcarticles/sfdcarticles/Reset-May...

 

Then test again with a new scene.

Message 3 of 35

info
Contributor
Contributor

Hi, thank you for your reply.

I had try to delete just prefs folder before this post. I never thought to delete the 2019  folder.

so now the error it's disappear, thanks man

0 Likes
Message 4 of 35

ninhenzo64
Contributor
Contributor

I found it's some outliner callback in here:

Z:/Documents/maya/2018/prefs/workspaces/Maya_Classic.json

Message 5 of 35

info
Contributor
Contributor

sorry but seems that this solution doesn't work. I deleted the entire folder maya 2019. but the error still remain

0 Likes
Message 6 of 35

mspeer
Consultant
Consultant

Hi!

Please be more precise, you said the error was gone, was this a mistake or was this correct and it appears now again, that's a difference.

Maybe there is a problem in one of your scenes or you added again a custom script,...

0 Likes
Message 7 of 35

info
Contributor
Contributor

Hi, sorry for my bad english 🙂

was this correct and it appears now again because  I added again a custom script. 

 

 

 

0 Likes
Message 8 of 35

mspeer
Consultant
Consultant

Hi!

It's not the englisch.

 

Based on your last posts, the problem was solved

and reappeared because of

1. A somehow corrupted scene

2. A custom script

3. A bug related to some Preferences settings.

 

Just again reset the Preferences to find out's what's causing it.

0 Likes
Message 9 of 35

info
Contributor
Contributor

Hi, thanks  for your support.

  1. I’ve try to reset the maya 2019 folder again. And I’ve reimport the scripts and some older stuff from previous folder’s back up, one of one to check in whar’s cause the problem.   All fine, no more error. The error appear when open a scene that I have to work.. it’s a cad file exported . Maybe some odd name in some pieces. there’s  a way to find what cause this problem . A debug ? I don’t know . Thanks anyway 
0 Likes
Message 10 of 35

mspeer
Consultant
Consultant

Hi!

If it's a scene specific problem, please provide the scene-file.

0 Likes
Message 11 of 35

info
Contributor
Contributor

I started a new project, so i reset my 2019 folder. and the problem appear again, so it's not releated to a scene specific

 

0 Likes
Message 12 of 35

ninhenzo64
Contributor
Contributor

I'm pretty sure it's a maya bug, to do with classic view set up in this file

Z:/Documents/maya/2018/prefs/workspaces/Maya_Classic.json

It looks like that's where the selCom command is declared.

Message 13 of 35

ninhenzo64
Contributor
Contributor

My whole studio is getting it, for the most part we just ignore it

Message 14 of 35

mspeer
Consultant
Consultant

Hi!

 

Your information is a bit confusing:

 

1. I’ve try to reset the maya 2019 folder again. And I’ve reimport the scripts and some older stuff from previous folder’s back up, one of one to check in whar’s cause the problem. All fine, no more error.

 

2. I started a new project, so i reset my 2019 folder. and the problem appear again.

 

"The error appear when open a scene that I have to work"

For me this looks like a scene-specific problem, maybe coupled with a specific custom layout. Without a scene-file and the layout settings i can't help you further.

 

You could also try a newer version of Maya

0 Likes
Message 15 of 35

ninhenzo64
Contributor
Contributor

we're getting this in maya 2018 and 2019, even in an empty scene, it's triggered by changing the selection in the outliner

 

you can use this code to find outliners with bad callbacks

 

from maya import cmds
for _editor in cmds.lsUI(editors=True): if not cmds.outlinerEditor(_editor, query=True, exists=True): continue _sel_cmd = cmds.outlinerEditor(_editor, query=True, selectCommand=True) if not _sel_cmd: continue print _editor, _sel_cmd

this is the output i'm getting:

 

outlinerPanel1 <function selCom at 0x7f29c5c04aa0>
outlinerPanel1Slave <function selCom at 0x7f29c5c04aa0>

it looks like maya's tring to set the outline selectCommand callback to a python function, but when it gets put in the json file the callback is converted to text which maya then tries to interpret as mel.

 

 

I fixed the issue by editing this file while maya was closed:

Z:\Documents\maya\2018\prefs\workspaces\Maya_Classic.json

I removed this chunk of code:

-selectCommand \"<function selCom at 0x7f29c5c04aa0>\" 

BTW the preview button is broken on this page

Message 16 of 35

ninhenzo64
Contributor
Contributor

here's an easier fix

from maya import cmds
for _editor in cmds.lsUI(editors=True):
    if not cmds.outlinerEditor(_editor, query=True, exists=True):
        continue
    _sel_cmd = cmds.outlinerEditor(_editor, query=True, selectCommand=True)
    if not _sel_cmd or not _sel_cmd.startswith('<function selCom at '):
        continue
    cmds.outlinerEditor(_editor, edit=True, selectCommand='pass')
0 Likes
Message 17 of 35

sulkybunny
Enthusiast
Enthusiast

Hi there.. 

 

having the same issue after using custom scripts on a cha7ratcer 

 

this last bit u refer to : “easier fix”

 

is that Also within 

Maya_Classic.json

 ?

 

did that eliminate the issue for you ?

0 Likes
Message 18 of 35

ninhenzo64
Contributor
Contributor
Accepted solution

no, this is python to run in the script editor. actually i found an issue with the last fix - it fixes the current session but then when maya shuts down it translates the python to mel and saves that to the Maya_Classic.json file. this is a better fix as it can be interpreted as mel or python:

 

from maya import cmds
for _editor in cmds.lsUI(editors=True):
    if not cmds.outlinerEditor(_editor, query=True, exists=True):
        continue
    _sel_cmd = cmds.outlinerEditor(_editor, query=True, selectCommand=True)
    if not _sel_cmd or not _sel_cmd.startswith('<function selCom at '):
        continue
    cmds.outlinerEditor(_editor, edit=True, selectCommand='print("")')

 

 

Message 19 of 35

nelsoncruz
Autodesk
Autodesk

Hey,  Would it be possible to share the custom script that is being used?  I am trying to track this down further on my end.    



Nelson Cruz
Manager, Software QA Engineering
Installation & Licensing forums | Contact product support | Autodesk AREA


0 Likes
Message 20 of 35

ninhenzo64
Contributor
Contributor
@nelsoncruz I'm pretty sure this isn't due to a custom script - I'm getting this with maya 2019 at home and with a number of artists using maya 2018 at my studio (including myself). It seems to be related to saving changes to workspaces, the dropdown in the top right of the maya interface. Maya sets the selectCommand callback on the outliner to a python function called "selCom". This works fine in the current session, but this change is also saved to a json file in preferences, which saves the selectCommand as the python converted to a string - eg. "<function selCom at 0x7f29c5c04aa0>". When you relaunch maya, the outliner selectCommand is restored from the json file, which maya then tries to interpret as mel, causing the error we're seeing.