Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error: <function selCom at 0x7f29c5c04aa0>;

34 REPLIES 34
SOLVED
Reply
Message 1 of 35
info
21321 Views, 34 Replies

Error: <function selCom at 0x7f29c5c04aa0>;

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

34 REPLIES 34
Message 2 of 35
mspeer
in reply to: info

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
in reply to: mspeer

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

Message 4 of 35
ninhenzo64
in reply to: info

I found it's some outliner callback in here:

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

Message 5 of 35
info
in reply to: mspeer

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

Message 6 of 35
mspeer
in reply to: info

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,...

Message 7 of 35
info
in reply to: mspeer

Hi, sorry for my bad english 🙂

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

 

 

 

Message 8 of 35
mspeer
in reply to: info

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.

Message 9 of 35
info
in reply to: mspeer

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 
Message 10 of 35
mspeer
in reply to: info

Hi!

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

Message 11 of 35
info
in reply to: mspeer

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

 

Message 12 of 35
ninhenzo64
in reply to: info

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
in reply to: ninhenzo64

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

Message 14 of 35
mspeer
in reply to: ninhenzo64

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

Message 15 of 35
ninhenzo64
in reply to: mspeer

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
in reply to: ninhenzo64

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')
Message 17 of 35
sulkybunny
in reply to: ninhenzo64

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 ?

Message 18 of 35
ninhenzo64
in reply to: sulkybunny

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
in reply to: info

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.    



First Name Last Name or First Name.Last Initial
Public Facing Job Title
Link Name | Link Name | Link Name | Link Name
Message 20 of 35
ninhenzo64
in reply to: nelsoncruz

@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.
 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report