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

Halo interfering with colorama brightness #28

Open
o355 opened this issue Oct 15, 2017 · 12 comments
Open

Halo interfering with colorama brightness #28

o355 opened this issue Oct 15, 2017 · 12 comments

Comments

@o355
Copy link

o355 commented Oct 15, 2017

In my program, I'm attempting to use the library Colorama to use terminal colors, and to brighten up text in my program. I'm also using halo for the spinners, but the two libraries conflict when a halo spinner is added.

Colorama's colored text automatically gets dimmed, and regardless if I disable the spinner, I'd have to brighten up each print statement, and every color change.

This appears to only be occurring on Windows, and in the default command prompt. I'm thinking the issue stems from changing the terminal color on your side.

@manrajgrover
Copy link
Owner

@o355 The only reason I can think of here is we need to call deinit in the library before exiting. But what confuses me is I'm not dimming the text anywhere in the library. Could you please share the code so that we can look into it?

@o355
Copy link
Author

o355 commented Oct 15, 2017

The code is in my project PyWeather on this account. It's in the pyweather.py file, and the code around line 1190 is where the issues begin to occur.

@manrajgrover
Copy link
Owner

@o355 I've gone through your code and from the looks of it, it is quite possible you are not ending your colored text with Fore.RESET. I've also tried producing this error on my machine, but nothing failed.

I would need external help as I don't have access to Windows machine to particularly look into this problem and to reproduce this issue as of now.

I would appreciate if you could also share screenshots here for further investigation along with following details:

  • Operating System:
  • Terminal in use:
  • Python version:
  • Halo version:
  • pip freeze output:

@o355
Copy link
Author

o355 commented Oct 21, 2017

Alright. I can tell you off the top of my head that I'm using Windows 10, and the issue occurs in PowerShell/Command Prompt. Python version is 3.6.2.

I'll get the halo version and pip freeze outout when I can.

@o355
Copy link
Author

o355 commented Oct 23, 2017

Here's the pip freeze output:

appJar==0.70
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
colorama==0.3.9
cursor==1.1.0
decorator==4.1.2
enum34==1.1.6
geopy==1.11.0
halo==0.0.6
idna==2.6
log-symbols==0.0.11
ratelim==0.1.6
requests==2.18.4
six==1.11.0
spinners==0.0.19
termcolor==1.1.0
urllib3==1.22

Halo version is 0.0.6 as seen above. I don't end my colored texts with Fore.RESET so I don't have an additional half a thousand Fore.RESET lines.

@winterjung
Copy link
Contributor

@o355 I tested your code on my Windows machine and didn't find any problem. Colorama and halo are working well together. Isn't any screenshots you expected and actually got? If you can, I hope you provide us minimal code we can test. 😄

@o355
Copy link
Author

o355 commented Oct 23, 2017

Hmm...interesting. Here's a screenshot of what I'm getting:
screenshot 16

I've been pretty busy lately, but I'll find some time to upload some minimal code that's based off the issues I'm getting. I also updated halo to 0.0.7 and the issue is persisting for my code.

@o355 o355 changed the title Halo interfering with colorama color styles Halo interfering with colorama brightness Oct 23, 2017
@o355
Copy link
Author

o355 commented Oct 23, 2017

I did a little investigating, and it looks to only be the brightness of the color that doesn't carry over from line to line, maybe even color to color.

@BenjaminUrquhart
Copy link

I can confirm this for Ubuntu Xenial

@manrajgrover
Copy link
Owner

@o355 Is this resolved now?

@o355
Copy link
Author

o355 commented Jan 12, 2018

@manrajgrover Can't confirm it's resolved as in my script I have the line to line brightness stuff. I'll have to write a quick script and I'll confirm if this is resolved.

@KhushC-03
Copy link

Was this issue ever fixed? Seems that this issue is still occurring and also preventing the colour to activate.

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

No branches or pull requests

5 participants