I am a muppet sorry, I should have included the Maya version. The python version reported by Ayon is 3.9.6
The reason I didn’t include the Maya version was because I had originally tried it with Maya 2020.4, with the Py2 toggle on (Got the exit stack error) then with the Maya 2023 with the Py2 toggle disabled and also got the exit stack error which made me think it was version agnostic and more to do with the actual check itself.
Attempting again this morning, Maya 2023 does now work (Huzzah!), so I think it is likely I wasn’t deploying the changes correctly and things that I thought I had changed hadn’t actually been deployed.
Is there a best practice when making changes to configuration to ensure they are deployed locally e.g. refreshing/restarting/logging off, etc?
Back on backwards compatibility, fixing the if statement to if getattr(contextlib, "ExitStack", None):
does get it past there but I still can’t see the addon in Maya 2020. Reported errors in the maya command line are the following:
Error Code
C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\vendor\python\python_2\arrow\arrow.py:28: DeprecationWarning: Arrow will drop support for Python 2.7 and 3.5 in the upcoming v1.0.0 release. Please upgrade to Python 3.6+ to continue receiving updates for Arrow.
DeprecationWarning,
*** WRN: >>> { ModulesLoader }: [ Failed to import "ayon_third_party" ]
==============================
invalid syntax (utils.py, line 541)
==============================
Traceback (most recent call last):
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 472, in _load_ayon_addons
mod = __import__(basename, fromlist=("",))
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\__init__.py", line 3, in <module>
from .addon import ThirdPartyDistAddon
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\addon.py", line 5, in <module>
from .utils import (
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\utils.py", line 10, in <module>
from ayon_common import (
File "C:\Program Files\Ynput\AYON 1.0.0\common\ayon_common\__init__.py", line 1, in <module>
from .utils import (
File "C:\Program Files\Ynput\AYON 1.0.0\common\ayon_common\utils.py", line 541
f"Invalid file extension \"{ext}\"."
^
SyntaxError: invalid syntax
*** WRN: >>> { ModulesLoader }: [ Addon ayon_third_party 1.0.0 has no content to import ]
*** WRN: >>> { GDriveHandler }: [ Import failed, imported from Python 2, operations will fail. ]
*** WRN: >>> { ModulesLoader }: [ Failed to import "ayon_sitesync" ]
==============================
invalid syntax (sftp.py, line 427)
==============================
Traceback (most recent call last):
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 472, in _load_ayon_addons
mod = __import__(basename, fromlist=("",))
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\__init__.py", line 1, in <module>
from .sync_server_module import SyncServerModule
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\sync_server_module.py", line 26, in <module>
from .providers import lib
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\providers\lib.py", line 4, in <module>
from .sftp import SFTPHandler
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\providers\sftp.py", line 427
raise ValueError(f"Certificate at '{key_paths}' doesn't exist.")
^
SyntaxError: invalid syntax
*** WRN: >>> { ModulesLoader }: [ Addon sitesync 1.0.3 has no content to import ]
Failed to execute userSetup.py
Traceback (most recent call last):
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\maya\startup\userSetup.py", line 11, in <module>
install_host(host)
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\pipeline\context_tools.py", line 123, in install_host
modules_manager = _get_modules_manager()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\pipeline\context_tools.py", line 78, in _get_modules_manager
_modules_manager = ModulesManager()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 837, in __init__
self.initialize_modules()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 890, in initialize_modules
system_settings = get_system_settings()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\lib.py", line 1136, in get_system_settings
return get_ayon_system_settings(default_settings)
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1534, in get_ayon_system_settings
addon_versions = _AyonSettingsCache.get_addon_versions()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1514, in get_addon_versions
if cls._use_bundles():
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1447, in _use_bundles
major, minor, _, _, _ = con.get_server_version_tuple()
File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\vendor\python\common\ayon_api\server_api.py", line 945, in get_server_version_tuple
re_match = VERSION_REGEX.fullmatch(
AttributeError: '_sre.SRE_Pattern' object has no attribute 'fullmatch'
Anyhow suspect the issue is with the ayon third party module not loading properly, but this is now in the program files so the issue is probably even deeper and probs not worth fixing for older version I’d suspect.
Anyhow appreciate the help guys,
Stephen