Is it the same error?
I have issue with mGear that I cannot open Facial rigger at all. Everything works but not this.
Hi @pkarbosski yes it seems like it is the same error. If you canāt wait for the fix to be released, you can grab the code from the link Miquel listed.
Or if you are comfortable scripting, you can search the file for the word āprintā.
If you see
print SOMETHING
replace it with
print(SOMETHING)
And it should fix that error.
I think the only file that needs fixing is:
mgear_4.0.3/release/scripts/mgear/rigbits/facial_rigger/lips_rigger.py
Thank you for VERY quick respond! Iāll try to repair it tomorrow.
I copied whole init.py and lips_rigger.py from Miquelās link and it works.
I tried to add brackets but I could do SOMETHING wrong and it did not fix the issue in the end.
Once again, thanks guys for your hard work!
Heya!
I thought that I solved the problem with FacialRigger. I managed to open it but I still canāt build a blink eye. Such an error pops up when I wanna create an eye.
I took bi-ped from template and tried to add blink to the already egxistning setup. Nothing fancy.
Any ideas how to solve the issue?
You might have to also take the eye_rigger file, or the entire facial_rigger or rigbits directory from the development repository. But please understand, if you take some files from the dev repository, you might cause some compatibility issues with other files, and cause different bugs.
Are you comfortable with scripting/programming? If not, it might be safer to wait for an official release with the fixes. (For me, I have 4.0.3 installed for testing, but I still use 3.7.11 in production, and I was using 3.6 up until last week, for compatibility until I finished a project.)
Hi guys
I have the same error as above:
AttributeError: ādictā object has no attribute āiteritemsā
I just downloaded the latest build that was put out yesterday, 4.0.7
Iām getting the error trying to build a lip rig using the facial rigger.
Any idea whatās happening? Everything else seems to work perfectly, so guessing itās not a python3 issue?
Iām thoroughly enjoying mgear btw. You guys managed to make rigging fun!
Hope to see a fix soon.
Best
/Chris
Sorry, I have a PR to fix the issue, but didnāt had time to check and merge
I will do it ASAP
I am also getting this same error in the facial rigger (eyes):
// Error: root : Uncaught exception
Traceback (most recent call last):
File "C:\Users\User\Documents\maya\modules\scripts\mgear\rigbits\facial_rigger\eye_rigger.py", line 1291, in build_rig
rig(**lib.get_settings_from_widget(self))
File "C:\Users\User\Documents\maya\modules\scripts\mgear\rigbits\facial_rigger\lib.py", line 57, in get_settings_from_widget
for attr, obj in widget.__dict__.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems' //
An update on this would be greatly appriciated
Cheers
Michiel
If thatās the only error youāre getting you can fix it by replacing .iteritems() for .items() on line 57 of lib.py (check the full path in the error message). Iteritems is how you used to iterate over a dictionary in python 2 but now itās just items in python 3.
Iām sure itās going to get fixed in the next release anyway, but as a quick fix that should do it.
Thanks! It works now Really appreciate the fast response
Is all this backwards compatible with Maya 2020 or do I have to update to 2022 to use mGear 4.0 and beyond since itās using python3?
Should work back to 2018. You can look in the /release/platforms folder to check which versions are supported. https://github.com/mgear-dev/mgear4/tree/master/release/platforms
And if there are any problems, please report a bug.
I finaly managed to try to hack the .py-files (by replacing .iteritems() for .items()). Initially it seems to do it, but when getting the lips rigger to work, I encounter the following, new error
// Error: root : Uncaught exception
Traceback (most recent call last):
File "C:\Users\User\Documents\maya\modules\scripts\mgear\rigbits\facial_rigger\lips_rigger.py", line 1106, in build_rig
rig(**lib.get_settings_from_widget(self))
File "C:\Users\User\Documents\maya\modules\scripts\mgear\rigbits\facial_rigger\lips_rigger.py", line 167, in rig
outPos)
File "C:\Users\User\Documents\maya\modules\scripts\mgear\core\meshNavigation.py", line 207, in edgeRangeInLoopFromMid
loopRange = set(midEdges + extremeEdges)
TypeError: unhashable type: 'MeshEdge' //
Thingās broken or am I overlooking stuff?
Looks like itās a new Maya bug in 2022.
In Maya 2018 and 2020, a MeshEdge is hashable, so you can run set(list()) on a list of edges. In Maya 2022 this fails. So line 207 of /mgear/core/meshNavigation is going to have to filter out duplicate edges in some new way, I guess.
There might not be any need to cast it as a set. Because at a quick test, it looks like the code already checks if the edge is in the lists, extremeEdges and midEdges, before appending them.
A simple test. Make a polySphere named pSphere1, and run this script:
import pymel.core as pm
sphere = pm.PyNode('pSphere1')
edges1 = [sphere.e[3]]
edges2 = [sphere.e[5], sphere.e[6], sphere.e[3], sphere.e[9]]
print(edges1 + edges2)
print(type(edges1 + edges2))
print(set(edges1 + edges2))
RESULT:
[MeshEdge('pSphereShape1.e[3]'), MeshEdge('pSphereShape1.e[5]'), MeshEdge('pSphereShape1.e[6]'), MeshEdge('pSphereShape1.e[3]'), MeshEdge('pSphereShape1.e[9]')]
<class 'list'>
# Error: TypeError: file <maya console> line 13: unhashable type: 'MeshEdge' #
Hi!
I had the same issue, and I believe Iāve solved it - hereās a pull request thatās already merged I think:
So If you want to do it manually, follow these changes:
āhttps://github.com/mgear-dev/mgear4/pull/89/commits/877be730352b9ccbc7c5093e8b6e56061624bc37ā
worked for me! ty!!!