I get this error when i click a material: " # Error: line 1: TypeError: file C:\solidangle\mtoadeploy\2017\scripts\mtoa\ui\ae\aiSwatchDisplay.py line 45: bad operand type for unary -: 'unicode' "

I get this error when i click a material: " # Error: line 1: TypeError: file C:\solidangle\mtoadeploy\2017\scripts\mtoa\ui\ae\aiSwatchDisplay.py line 45: bad operand type for unary -: 'unicode' "

kieart
Participant Participant
2,579 Views
3 Replies
Message 1 of 4

I get this error when i click a material: " # Error: line 1: TypeError: file C:\solidangle\mtoadeploy\2017\scripts\mtoa\ui\ae\aiSwatchDisplay.py line 45: bad operand type for unary -: 'unicode' "

kieart
Participant
Participant
 
0 Likes
2,580 Views
3 Replies
Replies (3)
Message 2 of 4

Stephen.Blair
Community Manager
Community Manager

Strange, because I've never seen any other reports of this.

What happens in you run this Python in the script editor?

gTextColumnWidthIndex = mel.eval("$tempVar=$gTextColumnWidthIndex;");

print( -gTextColumnWidthIndex );

Do you get the same error?

I suppose you could change line 45 like this:

                    aof=[('swatchLabel', "right", -int(gTextColumnWidthIndex))],

but the question is why does this happen on this one system?



// Stephen Blair
// Arnold Renderer Support
Message 3 of 4

kieart
Participant
Participant

🙂 I have fixed this error, i delete maya folder in Document Folder -> It oke 🙂 Thanks bro 😄

0 Likes
Message 4 of 4

kirstieGW8NJ
Community Visitor
Community Visitor

In response to the Python code I get this '# Error: TypeError: file <maya console> line 3: bad operand type for unary -: 'unicode' # ' instead of line 45 as it was in the above example. I'm using Maya 2019.

0 Likes