Home Website Youtube GitHub

Errorring updating mGear

Hi,
Not sure if anyone else ran into this issue. I am trying to drag and drop the latest release to install and update my 4.0.9 mGear installation in my Maya 2023.
I am getting an error that my local docs modules folders are read only. I tried unchecking the RO box in their properties but the change isn’t sticking and they remain RO.
I deleted some older modules folders all together and then it errors on the next version year it checks.

Here’s an example of the error message I get:

import maya.app.general.executeDroppedPythonFile as myTempEDPF
myTempEDPF.executeDroppedPythonFile("C:/Users/azaslavsky/Downloads/mgear_4.2.2/drag_n_drop_install.py", "")
del myTempEDPF
# Traceback (most recent call last):
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 133, in on_install_button_clicked
#     self.start_install()
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 212, in start_install
#     self.start_uninstall(install_path)
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 311, in start_uninstall
#     self.remove_directory(os.path.join(destination, item))
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 632, in remove_directory
#     shutil.rmtree(path)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 748, in rmtree
#     return _rmtree_unsafe(path, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   [Previous line repeated 1 more time]
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 630, in _rmtree_unsafe
#     onerror(os.rmdir, path, sys.exc_info())
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 628, in _rmtree_unsafe
#     os.rmdir(path)
# PermissionError: [WinError 5] Access is denied: 'C:\\Users\\azaslavsky\\Documents\\maya\\modules\\platforms\\2018\\windows\\x64\\plug-ins'
# Traceback (most recent call last):
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 133, in on_install_button_clicked
#     self.start_install()
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 212, in start_install
#     self.start_uninstall(install_path)
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 311, in start_uninstall
#     self.remove_directory(os.path.join(destination, item))
#   File "C:\Users/azaslavsky/Downloads/mgear_4.2.2\drag_n_drop_install.py", line 632, in remove_directory
#     shutil.rmtree(path)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 748, in rmtree
#     return _rmtree_unsafe(path, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 621, in _rmtree_unsafe
#     _rmtree_unsafe(fullname, onerror)
#   [Previous line repeated 1 more time]
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 630, in _rmtree_unsafe
#     onerror(os.rmdir, path, sys.exc_info())
#   File "C:\Program Files\Autodesk\Maya2023\Python\lib\shutil.py", line 628, in _rmtree_unsafe
#     os.rmdir(path)
# PermissionError: [WinError 5] Access is denied: 'C:\\Users\\azaslavsky\\Documents\\maya\\modules\\platforms\\2019\\linux\\x64\\plug-ins'

Thank you in advance for your time and help!

I can’t help with why you have permissions errors. Maybe it is a setting you can fix in Windows to allow a script to write to your Documents folder, or maybe it’s some anti-virus program. Or maybe something has gone wrong and will need fixing in your folders. I don’t know.

But I personally install using the Maya.env file. And you could try that to get around this issue. Make sure you remove the older versions you might already have in your Maya prefs folders.

Put the downloaded mGear files somewhere in a production folder. Then edit your Maya.env to point to the path you chose. It should point to the release folder where the module is:

MAYA_MODULE_PATH = D:/production/mgear/mgear_4.2.2/release

Thanks Chris.
So you put the whole release folder somewhere and point the ENV file to it.

What about the mgear.mod file?
How does one get the mGear menu to show up?

When I tried just placing the release folder, without running the install the mGear menu is missing.

I ended up getting the install to work, by renaming the folders I’d get an access error. Maya recreates them when it starts up, and if there were any py files I wanted to save I moved them back.

You put the whole mgear_4.X.X folder somewhere and point to the release folder. The .mod file is in there.

I don’t know why your mGear menu didn’t show up. That problem has happened for a lot of people for a few different reasons.

Glad you got the installer working though