Skip to content
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

[bug] conan --version traceback #14732

Closed
SSE4 opened this issue Sep 14, 2023 · 6 comments · Fixed by #14735
Closed

[bug] conan --version traceback #14732

SSE4 opened this issue Sep 14, 2023 · 6 comments · Fixed by #14735

Comments

@SSE4
Copy link
Contributor

SSE4 commented Sep 14, 2023

Environment details

  • Operating System+version: Windows 11
  • Compiler+version: N/A
  • Conan version: 2.0
  • Python version: 3.11.5

Steps to reproduce

  1. execute conan --version command
  2. observer Traceback error

Logs

photo_2023-09-12_19-45-30

conan --version should work regardless of the configuration and output the version.
if there is an error, it should display a human readable error message instead of Traceback.

@memsharded
Copy link
Member

Hi @SSE4

Could you please better copy&paste text instead of images, if possible? That helps reading.

I suspect the underlying reason is setting CONAN_HOME env-var, to something that makes it fail. Can you please confirm that this is the case, and what is the value making it fail? Thanks!

@SSE4
Copy link
Contributor Author

SSE4 commented Sep 14, 2023

Could you please better copy&paste text instead of images, if possible? That helps reading.

sorry, I cannot, that's all what I've got from user and he disappeared.
I can re-type from screen, if you want, but it's kinda tedious.

I suspect the underlying reason is setting CONAN_HOME env-var, to something that makes it fail. Can you please confirm that this is the case, and what is the value making it fail? Thanks!

I have no idea, and I have no Windows machine to try. it might be some environment variable that affects it, but I suspect:

  • conan --version should be able to display its version regardless of that
  • if it really cannot for some obscure reason, it should print user-friendly error message instead of Traceback

in general, I suspect, it should be enough to find a place of an error from the report itself as it has line number.

@memsharded
Copy link
Member

I can re-type from screen, if you want, but it's kinda tedious.

No, no, of course not necessary!

Thanks for the feedback, lets have a quick look at that.

@SSE4
Copy link
Contributor Author

SSE4 commented Sep 14, 2023

UPD: I think I see here some architecture problem. conan --version should be informational command, in other words, it only reads an information, and it shouldn't try to modify any data in cache or anywhere. in worst case, it should be able to work perfectly on read-only file-system.
but here I see conan --version tries to invoke os.makedirs, which is kinda too much for that command to operate. IMO it should handle all the exceptions (OSError) from os.makedirs, if any, and continue behavior normally. or just don't call it at all.

@memsharded
Copy link
Member

Lets fix the error messages, the architecture needs more time to be changed, but at some point we will fix it. Not failing at conan --version but failing the next command, still same problem, no difference.

@memsharded memsharded added this to the 2.0.11 milestone Sep 14, 2023
@memsharded
Copy link
Member

Closed by #14735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants