-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Exception with run_command using python_api: AttributeError: 'int' object has no attribute 'stdout' #13922
Comments
Downgrading CONDA to 22.9.0 solved the problem locally, exception is not appearing anymore |
Did you experiment with upgrading to the latest conda version |
Yes, I have tried upgrading before (24.5) but was not succeeding |
Also, is there a reason you're running conda commands with |
This works for me with newer versions of conda ( from conda.cli.python_api import Commands, run_command
def conda_run(command, *args, **kwargs):
stdout, stderr, ret_code = run_command(command, *args, **kwargs)
if ret_code != 0:
msg = f'Command {command} [{args}] ' \
f'{kwargs} returned {ret_code}\n' \
f'STDOUT:\n {stdout}\n' \
f'STDERR:\n {stderr}'
raise RuntimeError(msg)
return stdout
def main():
conda_run(Commands.CONFIG, '--set', 'pip_interop_enabled', 'True')
if __name__ == "__main__":
main() |
thanks a lot, I will have a detailed look. We are using a file with name dunder main py |
Checklist
What happened?
Sorry, we have an exception now in our conda builder. I went through all issues and could not find it. Are we overlooking something. This issue appeared after we upgraded python and conda, but we are not able to pin this problem exactly.
I copy&paste code example
Getting an exception
Conda Info
Conda Config
No response
Conda list
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: