Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception [RSS Feed]

#1 Jan. 3, 2011 00:31:48

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception


Disclaimer: I'm new to Django and system administration, though a C++
developer.

following the tutorial on:http://uswaretech.com/blog/2009/02/how-to-build-a-facebook-app-in-django/I get everything set up. In my settings.py, I have in my
MIDDLEWARE_CLASSES:
'facebook.djangofb.FacebookMiddleware',

When I run this, it renders:
"Unhandled Exception

An unhandled exception was thrown by the application.
"

my logs look like this (note "Error importing middleware" at the top
of the stack trace). Any idea how/why it cannot find this "middleware"
and why the exception would not be caught? Thank you in advance.

FastCGI: (dynamic) server "/home/pj/
public_html/dispatch.fcgi" (pid 18148) terminated by calling exit with
status '0'
FastCGI: (dynamic) server "/home/pj/
public_html/dispatch.fcgi" (pid 18148) termination signaled
FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr:
ImproperlyConfigured: Error importing middleware facebook.djangofb:
"No module named facebook.djangofb", referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: raise
exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"'
% (mw_module, e)), referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: File "/home/pj/
local/lib/python2.6/site-packages/django/core/handlers/base.py", line
47, in load_middleware, referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr:
self.load_middleware(), referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: File "/home/pj/
local/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line
247, in __call__, referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: result =
self.application(environ, start_response), referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: File "/home/pj/
local/lib/python2.6/site-packages/flup/server/fcgi_base.py", line
1118, in handler, referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr:
protocolStatus, appStatus = self.server.handler(self), referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: File "/home/pj/
local/lib/python2.6/site-packages/flup/server/fcgi_base.py", line 558,
in run, referer:http://apps.facebook.com/###/ FastCGI:
server "/home/pj/public_html/dispatch.fcgi" stderr: Traceback (most
recent call last):, referer:http://apps.facebook.com/###/--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 3, 2011 13:07:09

Daniel R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception


On Sunday, January 2, 2011 11:23:30 PM UTC, PJ wrote:
>
> Disclaimer: I'm new to Django and system administration, though a C++
> developer.
>
> following the tutorial on:
>http://uswaretech.com/blog/2009/02/how-to-build-a-facebook-app-in-django/> I get everything set up. In my settings.py, I have in my
> MIDDLEWARE_CLASSES:
> 'facebook.djangofb.FacebookMiddleware',
>
> When I run this, it renders:
> "Unhandled Exception
>
> An unhandled exception was thrown by the application.
> "
>
> my logs look like this (note "Error importing middleware" at the top
> of the stack trace). Any idea how/why it cannot find this "middleware"
> and why the exception would not be caught? Thank you in advance.


Have you actually installed the pyfacebook library?
--
DR.


>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 3, 2011 13:39:00

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception


Yes, I believe I installed all the pre-reqs, though let me know if I
should check anything else:
from the console:
>>> import facebook
>>> import facebook.djangofb
>>>
I'm thinking perhaps it's running the wrong version of python? My
server had 2.4 alias'd as python, but I re-alias'd python2.6 as python
in my .profile, however a "which python" gives my nothing, even though
python -V says 2.6.
Thanks

On Jan 3, 8:07 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Sunday, January 2, 2011 11:23:30 PM UTC, PJ wrote:
>
> > Disclaimer: I'm new to Django and system administration, though a C++
> > developer.
>
> > following the tutorial on:
> >http://uswaretech.com/blog/2009/02/how-to-build-a-facebook-app-in-dja...
> > I get everything set up. In my settings.py, I have in my
> > MIDDLEWARE_CLASSES:
> >     'facebook.djangofb.FacebookMiddleware',
>
> > When I run this, it renders:
> > "Unhandled Exception
>
> > An unhandled exception was thrown by the application.
> > "
>
> > my logs look like this (note "Error importing middleware" at the top
> > of the stack trace). Any idea how/why it cannot find this "middleware"
> > and why the exception would not be caught? Thank you in advance.
>
> Have you actually installed the pyfacebook library?
> --
> DR.
>
>
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 9, 2011 16:11:39

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception


Confirmed that Django is running 2.6.2, same version that I can
>>> import facebook.djangofb
>>>
on. I sawhttp://groups.google.com/group/django-users/browse_thread/thread/34f674ab2a083605/fcdc02c143ade43d?lnk=gst&q=djangofb#fcdc02c143ade43da while ago, but this was resolved with:
garagefan: doh, forgot that i never installed python-devel, der...
everything
works now, nothing to see here... no novice server users here >_>
I'm not sure what this means, or if it's even applicable to me, though
I wouldn't think that python-devel would be necessary, I believe it's
just c/c++ files?

On Jan 3, 8:38 am, PJ <pat.johnson1...@gmail.com> wrote:
> Yes, I believe I installed all the pre-reqs, though let me know if I
> should check anything else:
> from the console:>>> import facebook
> >>> import facebook.djangofb
>
> I'm thinking perhaps it's running the wrong version of python? My
> server had 2.4 alias'd as python, but I re-alias'd python2.6 as python
> in my .profile, however a "which python" gives my nothing, even though
> python -V says 2.6.
> Thanks
>
> On Jan 3, 8:07 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
>
>
> > On Sunday, January 2, 2011 11:23:30 PM UTC, PJ wrote:
>
> > > Disclaimer: I'm new to Django and system administration, though a C++
> > > developer.
>
> > > following the tutorial on:
> > >http://uswaretech.com/blog/2009/02/how-to-build-a-facebook-app-in-dja...
> > > I get everything set up. In my settings.py, I have in my
> > > MIDDLEWARE_CLASSES:
> > >     'facebook.djangofb.FacebookMiddleware',
>
> > > When I run this, it renders:
> > > "Unhandled Exception
>
> > > An unhandled exception was thrown by the application.
> > > "
>
> > > my logs look like this (note "Error importing middleware" at the top
> > > of the stack trace). Any idea how/why it cannot find this "middleware"
> > > and why the exception would not be caught? Thank you in advance.
>
> > Have you actually installed the pyfacebook library?
> > --
> > DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support