-
Notifications
You must be signed in to change notification settings - Fork 10
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
Invalid format specifier crash #9
Comments
Thanks for the report. I'd still like to be able to not pass that completely silently, e.g. logging a warning but I can see that likely cluttering up your logs if this by default is in your envs. Maybe we should have a @Strangenoise thoughts? @antirotor any thoughts on this from AYON/OpenPype's perspective? Also, the issue is similar to this one #7 (comment) with the request to allow invalid formatting strings @Strangenoise with your example 'fix' code I assume it'll completely stop formatting the full variable completely instead of only skipping the invalid ones within the string. Is that intended behavior? |
@BigRoy a verbosity level is usually a good thing, so using It's the purposed behavior yes, is it the best one, perhaps not. Note that I tested my purposed fix, the resulting env (dict) returned by the function contains an empty string for my env var, which is good to me in my specific case. |
Actually, doesn't your example fix raise a |
I think that solution with the |
Yes it should raise a KeyError, but instead I just got an empty string... Perhaps data is updated somewhere before the error, but I can't find where. Anyway, just logging that this specific key can't be processed can be a good solution do me. I also find the ACRE_VERBOSE solution elegant. And as I'm working with rez I can easily set my environement and manage such an env var. |
Hi BigRoy, thanks for all your work on acre and OpenPype.
I just faced a small and peculiar issue and whished to inform you about it.
Context
I'm deploying rez in my studio and we use OpenPype.
I modified OpenPype to be a rez package and also be able to launch rez packages (instead of applications).
So I've got an acre rez package.
On windows 10, everything is ok.
On linux (Pop!_OS 22.04 LTS), acre crashes when trying to format
REZ_STORED_PROMPT_SH
environment variable.With this env var containing:
'REZ_STORED_PROMPT_SH': '\\[\\e]0;\\u@\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$
.Note that's an env var generated by rez, not one that I control directly.
Traceback
Solution proposal
Keep data unformated when they can't be.
In
core.py (67:74)
:The text was updated successfully, but these errors were encountered: