django-facebook


No handlers could be found for logger “django_facebook.models”


while installing django_facebook, i got an error :
Validating models...
No handlers could be found for logger "django_facebook.models"
Unhandled exception in thread started by <function wrapper at 0x1032a5758>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 113, in get_validation_errors
from django.utils.image import Image
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 154, in <module>
Image, _imaging, ImageFile = _detect_image_library()
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 108, in _detect_image_library
_("Neither Pillow nor PIL could be imported: %s") % err
django.core.exceptions.ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named Image
It is a pure django project created by pycharm. I was following the document of django_facebook, installation section. What I do is just get facebook app and type the code 'django_facebook' in INSTALLED_APP in settings.py.
It's same results when syncdb also.
I'm using python-2.7.5 and django-1.6.5.
I can't find any answer to solve this. anybody knows this?
Regarding the warningNo handlers could be found for logger "django_facebook.models" and not the error. This question came up on search for that warning, thought this would be useful for others.
django-facebook outputs logs when in operation, just like other django components do. You have to tell Django what you want to do with these messages. In django terminology the app outputs some messages as a logger without needing to know what to do with them, you have to then patch these to a handler which doesn't know anything about your use case, but does know about sending emails/texts/carrier pigeons.
In your settings.py file find LOGGING=..., in the loggers dict you will have to specify what handlers you want to handle the output from django-facebook.
For more information see the docs on logging https://djangoproject.com/en/dev/topics/logging/
My logging variable looks like this, notice the bit at the bottom:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
},
'django_facebook.models': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
}
}
}
You could try pip install pillow

Related Links

No handlers could be found for logger “django_facebook.models”

Categories

HOME
oracle
nam
mod-rewrite
mpdf
clearcase
focus
yii
swi-prolog
foaf
odata
tfs2015
tibco
linker
azure-mobile-services
clone
sympy
static-analysis
nexus3
erd
phpstorm-2017.1
live-streaming
smartgwt
google-awareness
spring-jpa
pywinauto
cloudsim
cpu-usage
gitkraken
liferay-6.2
unordered-multimap
password-generator
hevc
onchange
ninject
ibm-connections
jsonresult
substance
tilemill
windows2012
series
riotjs
epplus
caesar-cipher
cargo
cloudera-quickstart-vm
recovery
sspi
game-center
system-on-chip
virtual-memory
bit-shift
music21
htmlspecialchars
stateless-session-bean
clrs
glimpse
hmmlearn
oracle-fusion-apps
cocoa-bindings
haraka
libharu
node.js-connect
as3-api
servicestack-bsd
odesk
place
astropy
netdatacontractserializer
espresso
compositetype
physicsjs
adhoc-polymorphism
configurable-product
qt5.4
relationships
full-text-indexing
tabletools
roxy-fileman
principalcontext
san
mousemotionlistener
yii-booster
blobstorage
flv
sly-scroller
semicolon
reentrancy
django-filebrowser
itunes-sdk
first-class
gamesalad
background-repeat
delphi-prism
uipasteboard
canonicalization

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App