-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Reduce 'six' usage #777
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ynbot
added
size/S
type: enhancement
Improvement of existing functionality or minor addition
labels
Jul 15, 2024
Somehow getting this when launching applications: *** WRN: >>> { app_maya/2024 }: [ ERROR in anatomy.format: argument of type 'type' is not iterable ]
==============================
ERROR in anatomy.format: argument of type 'type' is not iterable
==============================
Traceback (most recent call last):
File "E:\dev\ayon-applications\client\ayon_applications\utils.py", line 480, in prepare_context_environments
workdir = get_workdir_with_workdir_data(
File "E:\dev\ayon-core\client\ayon_core\pipeline\workfile\path_resolving.py", line 142, in get_workdir_with_workdir_data
output = template_obj.format_strict(workdir_data)
File "E:\dev\ayon-core\client\ayon_core\lib\path_templates.py", line 139, in format_strict
result = self.format(*args, **kwargs)
File "E:\dev\ayon-core\client\ayon_core\pipeline\anatomy\templates.py", line 96, in format
result = StringTemplate.format(self, data)
File "E:\dev\ayon-core\client\ayon_core\lib\path_templates.py", line 117, in format
part.format(data, result)
File "E:\dev\ayon-core\client\ayon_core\lib\path_templates.py", line 520, in format
if self.validate_value_type(value):
File "E:\dev\ayon-core\client\ayon_core\lib\path_templates.py", line 458, in validate_value_type
if inh_class in str:
TypeERROR: argument of type 'type' is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\dev\ayon-applications\client\ayon_applications\action.py", line 126, in process
self.application.launch(
File "E:\dev\ayon-applications\client\ayon_applications\defs.py", line 298, in launch
return self.manager.launch(self.full_name, *args, **kwargs)
File "E:\dev\ayon-applications\client\ayon_applications\manager.py", line 173, in launch
return self.launch_with_context(context)
File "E:\dev\ayon-applications\client\ayon_applications\manager.py", line 149, in launch_with_context
return launch_context.launch()
File "E:\dev\ayon-applications\client\ayon_applications\manager.py", line 597, in launch
self.run_prelaunch_hooks()
File "E:\dev\ayon-applications\client\ayon_applications\manager.py", line 581, in run_prelaunch_hooks
prelaunch_hook.execute()
File "E:\dev\ayon-core\client\ayon_core\hooks\pre_global_host_data.py", line 46, in execute
prepare_context_environments(temp_data)
File "E:\dev\ayon-applications\client\ayon_applications\utils.py", line 488, in prepare_context_environments
raise ApplicationLaunchFAILED(
ayon_applications.exceptions.ApplicationLaunchFAILED: ERROR in anatomy.format: argument of type 'type' is not iterable |
|
...I should maybe enable path to ayon-core in dev bundle. |
BigRoy
reviewed
Jul 15, 2024
BigRoy
approved these changes
Jul 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if there's anything else to test.
- Launching applications works (Maya, Fusion, Houdini, Standalone Loader, Standalone Publisher)
- Updating containers works
- Loader works Fusion, Maya, Houdini
- Publishing works standalone publisher, Fusion, Maya
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog Description
As we moved from Python 2 we don't need to use
six
module anymore.Additional info
Code where
six
module was used for Py2 and Py3 compatibility is not used anymore. There are still places wheresix
is used but those are not as simple changes as these.Replaced
six.string_types
withstr
. Instead of usingsix.add_metaclass
is usedABC
base class to define metaclass, or creation of class definesmetaclass=...
in creation. Replacedsix.reraise
with simple raise of exception, and some special cases are using different traceback.Testing notes: