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

ValueError: Unable to configure handler 'console': Cannot resolve 'ColorStreamHandler.ColorStreamHandler': No module named _curses #22

Open
juragandotid opened this issue Feb 14, 2018 · 3 comments

Comments

@juragandotid
Copy link

When i'm running it get an error :

Traceback (most recent call last):
File "index.py", line 12, in
logging.config.dictConfig(LOGGING)
File "C:\Python27\lib\logging\config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "C:\Python27\lib\logging\config.py", line 576, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'console': Cannot resolve 'ColorStreamHandler.ColorStreamHandler': No module named _curses

@radzi00
Copy link

radzi00 commented Feb 21, 2018

after: pip.exe install curses-2.2-cp27-none-win_amd64.whl
downloaded from:
https://download.lfd.uci.edu/pythonlibs/n1rrk3iq/curses-2.2-cp27-none-win_amd64.whl

I get the:
Traceback (most recent call last):
File "email_crawler.py", line 12, in
logging.config.dictConfig(LOGGING)
File "C:\Python27\lib\logging\config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "C:\Python27\lib\logging\config.py", line 576, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'console': tparm() argument 1 must be string, not None

@kjaz89
Copy link

kjaz89 commented Apr 22, 2018

we have the same issues?
File "C:\Crawler\email_crawler.py", line 12, in
logging.config.dictConfig(LOGGING)
File "C:\Python27\lib\logging\config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "C:\Python27\lib\logging\config.py", line 576, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'console': Cannot resolve 'ColorStreamHandler.ColorStreamHandler': No module named _curses

@MarcoCiaramella
Copy link

MarcoCiaramella commented Jul 5, 2019

fixed disabling logging configuration in email_crawler.py and adding custom configuration

from settings import LOGGING
import logging, logging.config
from logging.handlers import TimedRotatingFileHandler
from logging.handlers import RotatingFileHandler
import urllib, urllib2
import re, urlparse
import traceback
from database import CrawlerDb

# Debugging
# import pdb;pdb.set_trace()

# Logging
#logging.config.dictConfig(LOGGING)
logger = logging.getLogger("crawler_logger")
logger.setLevel(logging.INFO)
handler = TimedRotatingFileHandler('log','midnight',1,30)
formatter = logging.Formatter('%(asctime)s %(name)-2s %(levelname)-2s %(message)s','%y-%m-%d %H:%M:%S')
handler.setFormatter(formatter)
logger.addHandler(handler)

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

4 participants