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
We're using the parameter --format json when running conan create to get some information about the build. The output is redirected into a file using > buildinfo.json. The problem is now that when an internally used library like urllib emits warnings to stdout this output ends up in the json file, making it invalid. We stumbled across this bug after updating to Python 3.11 and a new urllib version which now prints warnings whenever a conanfile performs a download with verify=False.
My suggestion would be to change the --format json parameter to --json <filename> and write only the json data to the specified file.
The text was updated successfully, but these errors were encountered:
I was trying to check the issue reproducing it but it seems that the logs from urlib3 are not polluting the stdout for me.
We have specifically a line in Conan to avoid this here:
#17507 adds a new --output-file to enforce writing the result in that file irrespective of the stdout redirections or other possible issues. It will be in next Conan 2.12. Thanks for the feedback!
Describe the bug
Conan 2
How to reproduce it
We're using the parameter
--format json
when runningconan create
to get some information about the build. The output is redirected into a file using> buildinfo.json
. The problem is now that when an internally used library like urllib emits warnings to stdout this output ends up in the json file, making it invalid. We stumbled across this bug after updating to Python 3.11 and a new urllib version which now prints warnings whenever a conanfile performs a download withverify=False
.My suggestion would be to change the
--format json
parameter to--json <filename>
and write only the json data to the specified file.The text was updated successfully, but these errors were encountered: