{"action":"created","issue":{"url":"https://api.github.com/repos/LabPy/lantz/issues/51","labels_url":"https://api.github.com/repos/LabPy/lantz/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/LabPy/lantz/issues/51/comments","events_url":"https://api.github.com/repos/LabPy/lantz/issues/51/events","html_url":"https://github.com/LabPy/lantz/issues/51","id":67396042,"number":51,"title":"Error with logging, Style not defined","user":{"login":"joeadam","id":9285529,"avatar_url":"https://avatars.githubusercontent.com/u/9285529?v=3","gravatar_id":"","url":"https://api.github.com/users/joeadam","html_url":"https://github.com/joeadam","followers_url":"https://api.github.com/users/joeadam/followers","following_url":"https://api.github.com/users/joeadam/following{/other_user}","gists_url":"https://api.github.com/users/joeadam/gists{/gist_id}","starred_url":"https://api.github.com/users/joeadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeadam/subscriptions","organizations_url":"https://api.github.com/users/joeadam/orgs","repos_url":"https://api.github.com/users/joeadam/repos","events_url":"https://api.github.com/users/joeadam/events{/privacy}","received_events_url":"https://api.github.com/users/joeadam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-09T16:13:48Z","updated_at":"2015-04-16T21:08:16Z","closed_at":null,"body":"Using lantz 0.3 on Windows (Python 3.4.3 :: Anaconda 2.2.0 (32-bit).\r\n\r\nWhen I try to use logging, \r\n\r\n    from lantz.log import log_to_screen, DEBUG\r\n    log_to_screen(DEBUG)\r\n\r\nI get an error on every log print\r\n\r\n--- Logging error ---\r\nTraceback (most recent call last):\r\n  File \"C:\\Anaconda3\\lib\\logging\\__init__.py\", line 978, in emit\r\n    msg = self.format(record)\r\n  File \"C:\\Anaconda3\\lib\\logging\\__init__.py\", line 828, in format\r\n    return fmt.format(record)\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\log.py\", line 148, in color_format\r\n    parts[0] = bef + self.colorize(dur, record) + aft\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\log.py\", line 136, in colorize\r\n    return color + message + Style.RESET_ALL\r\nNameError: name 'Style' is not defined\r\nCall stack:\r\n  File \"k2308.py\", line 88, in <module>\r\n    print(inst.output_enable[1])\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\driver.py\", line 355, in __exit__\r\n    self.finalize()\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\messagebased.py\", line 332, in fina\r\nlize\r\n    super().finalize()\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\action.py\", line 129, in call\r\n    instance.log_info('{} returned {}', name, out)\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\driver.py\", line 304, in log_info\r\n    self.log(logging.INFO, msg, *args, **kwargs)\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\lantz\\driver.py\", line 296, in log\r\n    logger.log(level, msg, *args, extra=self.log_extra)\r\nMessage: '{} returned {}'\r\nArguments: ('finalize', None)\r\n\r\nIf I import colorama manually, it imports fine, and Style is present.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/LabPy/lantz/issues/comments/93839936","html_url":"https://github.com/LabPy/lantz/issues/51#issuecomment-93839936","issue_url":"https://api.github.com/repos/LabPy/lantz/issues/51","id":93839936,"user":{"login":"ntvandehey","id":10214076,"avatar_url":"https://avatars.githubusercontent.com/u/10214076?v=3","gravatar_id":"","url":"https://api.github.com/users/ntvandehey","html_url":"https://github.com/ntvandehey","followers_url":"https://api.github.com/users/ntvandehey/followers","following_url":"https://api.github.com/users/ntvandehey/following{/other_user}","gists_url":"https://api.github.com/users/ntvandehey/gists{/gist_id}","starred_url":"https://api.github.com/users/ntvandehey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntvandehey/subscriptions","organizations_url":"https://api.github.com/users/ntvandehey/orgs","repos_url":"https://api.github.com/users/ntvandehey/repos","events_url":"https://api.github.com/users/ntvandehey/events{/privacy}","received_events_url":"https://api.github.com/users/ntvandehey/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T21:08:16Z","updated_at":"2015-04-16T21:08:16Z","body":"figured it out... \r\n\r\ninsert this in log.py, just after \"import threading\" (line 19 for me)\r\n\r\n    import colorama\r\n    from colorama import Fore, Back, Style\r\n\r\n"}}