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

AttributeError: 'AnsiCodes' object has no attribute 'LIGHTBLUE_EX' #366

Closed
Quantenradierer opened this issue Jun 8, 2016 · 7 comments
Closed

Comments

@Quantenradierer
Copy link

Quantenradierer commented Jun 8, 2016

I updated from 0.32dev to 0.32 and now i get an error:

buildozer android_new release
[...]
> Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/leto/Projekte/pysendency/client/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 755, in <module>
    main()
  File "/home/leto/Projekte/pysendency/client/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 752, in main
    ToolchainCL()
  File "/home/leto/Projekte/pysendency/client/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 341, in __init__
    getattr(self, args.command)(unknown)
  File "/home/leto/Projekte/pysendency/client/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 91, in wrapper_func
    info_notify('No dist exists that meets your requirements, '
  File "pythonforandroid/logger.py", line 101, in info_notify
    info('{}{}{}{}'.format(Err_Style.BRIGHT, Err_Fore.LIGHTBLUE_EX, s,
  File "pythonforandroid/logger.py", line 70, in __getattr__
    return getattr(self._real, key) if self._enabled else self._dict[key]
AttributeError: 'AnsiCodes' object has no attribute 'LIGHTBLUE_EX'
Command failed: python -m pythonforandroid.toolchain --color=always --storage-dir=/home/leto/Projekte/pysendency/client/.buildozer/android/platform/build create --dist_name=ascendancy --bootstrap=sdl2 --requirements=kivy,hostpython2,sdl2,pysdl2,sdl2_image,png,pil --arch armeabi-v7a --copy-libs

i found this error here too: kivy/python-for-android@4f87df1
So, I assume it has something to do with my current colorama version, which is only 0.2.5.

Found existing installation: colorama 0.2.5

Also, I can't install a new version:
Not uninstalling colorama at /usr/lib/python2.7/dist-packages, owned by OS
(OS=Mint 17.2 Rafaela 64-bit, KDE)

It would be useful to check the requirement and output if something doesn't match.

@pythonic64
Copy link
Contributor

You need colorama version > 0.3 .
Try uninstalling python-colorama with:
sudo apt-get remove python-colorama
and then installing it with pip:
sudo pip install colorama

@Quantenradierer
Copy link
Author

It's an solution (and worked) for me.
But it's still an error which should be fixed, e.g. by throwing an useful message

@bakwc
Copy link

bakwc commented Dec 25, 2016

In ubuntu colorama is used for pip so when you run apt-get remove python-colorama pip will be removed too. So I justed run sudo pip install --upgrade colorama

@rnixx
Copy link
Member

rnixx commented Dec 25, 2016

@bakwc

So I justed run sudo pip install --upgrade colorama

I doubt that this works. At least my pip complained about the attempt (dist-packages vs. site-packages on debian based systems). Anyway, when uninstalling via apt you can still reinstall pip using easy_install

@bakwc
Copy link

bakwc commented Dec 25, 2016

At least my pip complained about the attempt (dist-packages vs. site-packages on debian based systems).

Yep, it complained, but it seems to upgrade anyway.

@lispread
Copy link

it doesn't work for me

@RiaanLab
Copy link

Same issue and upgrading colorama does not resolve it.

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

No branches or pull requests

7 participants