-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[FIX] AttributeError: 'AnsiCodes' object has no attribute 'LIGHTBLUE_EX' #422
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
Conversation
"colorama<0.3" have no LIGHTBLUE_EX. Fixes.
Nice fix, thanks. |
[FIX] AttributeError: 'AnsiCodes' object has no attribute 'LIGHTBLUE_EX'
if this patch fixes the error in the issue name, then what is it causing here?
Note that I did first try to install p4a via |
Do you definitely have colorama>0.3 actually installed? |
Well ... probably not. Hadn't checked. I ran the scripts according to how to install p4a and this is where it errored out. ... ok, turns out I do have it installed:
I did now also install |
What colours does it actually have? I'm not sure how best to check, but it should be clear in e.g. the |
You can install colorama from https://github.com/tartley/colorama. In my case this solved the problem |
This also worked for me. |
This PR is incorrect. Those colors were renamed (ex. |
@cvergari Are you sure you only have 0.3.9 installed, and that p4a is using it? I could not reproduce this error with 0.3.9. I'm not sure it should even be possible, as colorama's internal structure has changed such that Fore, Style etc. are no longer AnsiCodes objects but would appear as AnsiFore etc. |
@inclement Yes I have 0.3.9 installed, or at least it correctly appears in pip list. However, I think I simply broke my whole system by upgrading Python to 2.7.13, then upgrading colorama in python3, then in python2, then doing only god knows what. |
@Giszmo @cvergari: You could get a more sane ground using a virtualenv. Mixing the system Python with SO-Installed packages and pip-installed packages is not always good. I would advise to Then install via With that working, you can bisect what versions works and what does not and update the |
@alanjds I started using virtualenv after that. I am new to linux and I was waiting for a crisis just like this one to find the motivation to learn virtualenv. |
Strange. I doubt that because there is no "nesting" of venvs. You can activate one from inside another with no problem. The new "activation" effectively ignores the old one. But maybe you need to install the "virtualenv" package on the "outer" virtualenv too. |
I receive this message when running from virtualenv:
I tried installing virtualenv within the outer one, but get the same error. |
This is weird. I will not doubt the author of this line, but is very strange. Anyway, if you need to install a module, usually prefer via Please try to uninstall from all sources and install again via |
@alanjds I always use pip when packages are available on pypi! |
:( So I am out of ideas for now |
No worries! After starting from scratch, colorama is not a problem anymore. P4a is still not working...but I'll bang my head against it some more on my own before asking for help here. Thanks guys! |
Come to the IRC if needing: Server: irc.freenode.net or Web: https://webchat.freenode.net/ |
The virtualenv nesting used to cause an error. Possibly it doesn't any more. Updating this would be welcome if anyone can confirm it. |
"colorama<0.3" have no LIGHTBLUE_EX. Fixes.