-
Notifications
You must be signed in to change notification settings - Fork 65
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
Error with logging, Style not defined #51
Comments
Thanks for the report. We are anyway reworking but I will try to fix it before if I have some time. |
Joeadam- |
figured it out... insert this in log.py, just after "import threading" (line 19 for me)
|
Fixes it for me as well From: ntvandehey [mailto:notifications@github.com] figured it out... insert this in log.py, just after "import threading" (line 19 for me) import colorama from colorama import Fore, Back, Style — Joseph Adam, Technology Developer Sentec Ltd phone: +44(0) 1223 303800 This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postmaster@sentec.co.uk immediately, Sentec Limited is registered at the above address UK Company Number 3452194. |
Hello, |
Using lantz 0.3 on Windows (Python 3.4.3 :: Anaconda 2.2.0 (32-bit).
When I try to use logging,
I get an error on every log print
--- Logging error ---
Traceback (most recent call last):
File "C:\Anaconda3\lib\logging__init__.py", line 978, in emit
msg = self.format(record)
File "C:\Anaconda3\lib\logging__init__.py", line 828, in format
return fmt.format(record)
File "C:\Anaconda3\lib\site-packages\lantz\log.py", line 148, in color_format
parts[0] = bef + self.colorize(dur, record) + aft
File "C:\Anaconda3\lib\site-packages\lantz\log.py", line 136, in colorize
return color + message + Style.RESET_ALL
NameError: name 'Style' is not defined
Call stack:
File "k2308.py", line 88, in
print(inst.output_enable[1])
File "C:\Anaconda3\lib\site-packages\lantz\driver.py", line 355, in exit
self.finalize()
File "C:\Anaconda3\lib\site-packages\lantz\messagebased.py", line 332, in fina
lize
super().finalize()
File "C:\Anaconda3\lib\site-packages\lantz\action.py", line 129, in call
instance.log_info('{} returned {}', name, out)
File "C:\Anaconda3\lib\site-packages\lantz\driver.py", line 304, in log_info
self.log(logging.INFO, msg, _args, *_kwargs)
File "C:\Anaconda3\lib\site-packages\lantz\driver.py", line 296, in log
logger.log(level, msg, *args, extra=self.log_extra)
Message: '{} returned {}'
Arguments: ('finalize', None)
If I import colorama manually, it imports fine, and Style is present.
The text was updated successfully, but these errors were encountered: