You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following issue when using rez API in my tests with pytest:
2020-10-08 09:27:59,859|setcontext|solve_util|l. 465| ERROR| Context couldn't be resolved.Traceback (most recent call last): File "/app/package/int/setcontext/current/python/setcontext/solve_util.py", line 460, in _resolve resolved_context = ResolvedContext(package_list, **kwargs) File "/app/package/ext/rez/current/python/rez/resolved_context.py", line 208, in __init__ for x in config.implicit_packages] File "/app/package/ext/rez/current/python/rez/utils/data_utils.py", line 191, in __get__ result = self.func(instance) File "/app/package/ext/rez/current/python/rez/utils/data_utils.py", line 587, in getter return self._validate_key(key, attr, key_schema) File "/app/package/ext/rez/current/python/rez/config.py", line 614, in _validate_key return key_schema.validate(value) File "/app/package/ext/rez/current/python/rez/config.py", line 54, in validate data = expand_system_vars(data) File "/app/package/ext/rez/current/python/rez/config.py", line 783, in expand_system_vars return _expanded(data) File "/app/package/ext/rez/current/python/rez/config.py", line 778, in _expanded return [_expanded(x) for x in value] File "/app/package/ext/rez/current/python/rez/config.py", line 778, in <listcomp> return [_expanded(x) for x in value] File "/app/package/ext/rez/current/python/rez/config.py", line 776, in _expanded return scoped_format(value, system=system) File "/app/package/ext/rez/current/python/rez/utils/scope.py", line 262, in scoped_format return formatter.format(txt, pretty=pretty, expand=expand) File "/app/package/ext/rez/current/python/rez/utils/formatting.py", line 182, in format return formatter.format(s) File "/usr/local/lib/python3.7/string.py", line 186, in format return self.vformat(format_string, args, kwargs) File "/usr/local/lib/python3.7/string.py", line 190, in vformat result, _ = self._vformat(format_string, args, kwargs, used_args, 2) File "/usr/local/lib/python3.7/string.py", line 230, in _vformat obj, arg_used = self.get_field(field_name, args, kwargs) File "/app/package/ext/rez/current/python/rez/utils/formatting.py", line 117, in get_field return Formatter.get_field(self, field_name, args, kwargs) File "/usr/local/lib/python3.7/string.py", line 301, in get_field obj = getattr(obj, i) File "/app/package/ext/rez/current/python/rez/utils/data_utils.py", line 191, in __get__ result = self.func(instance) File "/app/package/ext/rez/current/python/rez/system.py", line 52, in os r = platform_.os File "/app/package/ext/rez/current/python/rez/utils/data_utils.py", line 191, in __get__ result = self.func(instance) File "/app/package/ext/rez/current/python/rez/utils/platform_mapped.py", line 31, in inner result = func(*args, **kwargs) File "/app/package/ext/rez/current/python/rez/utils/platform_.py", line 33, in os return self._os() File "/app/package/ext/rez/current/python/rez/utils/platform_.py", line 231, in _os stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True File "/app/package/ext/rez/current/python/rez/utils/execution.py", line 54, in __init__ file_no = sys.stdin.fileno() File "/app/package/ext/pytest/6.0.2/0195e0b9d4f737afb12e188f1abf4b9e01abb774/python/_pytest/capture.py", line 228, in fileno raise UnsupportedOperation("redirected stdin is pseudofile, has no fileno()")io.UnsupportedOperation: redirected stdin is pseudofile, has no fileno()
Rez version : 2.68.4
Platform and operating system: Linux CentOS 7.6.1810
Contextual information:
Create a file test_main.py with the following content:
#!/usr/bin/env python# coding: utf-8"""Test rez log."""fromrez.resolved_contextimportResolvedContextdeftest_rez_log():
# You can use another package you havecontext=ResolvedContext(["python"])
print(context)
test_rez_log()
Run the script with rez API in the environment (I have rez API as a rez package) :
Hi,
I have the following issue when using rez API in my tests with pytest:
Rez version : 2.68.4
Platform and operating system: Linux CentOS 7.6.1810
Contextual information:
Here is my result:
You should see the error appear. I will propose a Pull Request about this.
The text was updated successfully, but these errors were encountered: