Open mday299 opened 10 years ago
Hi Michael, that particular error comes from django-allauth, which AfterFlight uses for authentication. You need to set up django-allauth with something like Facebook or Github authentication through the admin backend. If you go to http://localhost:8000/admin, can you log in to the backend? You need create a facebook app on their app developer page or equivalent at another auth provider ( https://github.com/pennersr/django-allauth ) and then enter the API key data into the backend. Another option is that you might be able to just remove django-allauth from your settings.py for the time being if you don't need to authenticate users with a service like Facebook. I'm not sure if that will break things. As I write this I'm vaguely remembering something about needing a database entry in the "sites" app before allauth will work. I'll try to find time tomorrow to do a fresh AfterFlight install and maybe see if I can simplify things. I've ignored AfterFlight for far too long now because of my new project, Climbshare, but maybe you've inspired me to get back to it.
Thanks for responding so quickly,
I tried removing all allauth lines in the settings.py file (I don't really care about authentication, nor do I want to set something up on Facebook or Github, this thing local to my machine). That resulted in a server error when trying to access the main page (though the admin page still works). I re-enabled the allauth modules and the error persists. I'm a bit confused.
The error is:
ConnectionError at /
Error 111 connecting localhost:6379. Connection refused.
Environment:
Request Method: GET Request URL: http://localhost:8000/ConnectionError at /
Error 111 connecting localhost:6379. Connection refused.
Django Version: 1.6.4 Python Version: 2.7.6 Installed Applications: ('cacheops', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'logbrowse', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.github', 'allauth.socialaccount.providers.google', 'django.contrib.admin', 'progressbarupload', 'fluent_comments', 'crispy_forms', 'django.contrib.comments', 'debug_toolbar') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')
Traceback: File "/home/maday/.local/lib/python2.7/site-packages/Django-1.6.4-py2.7.egg/django/core/handlers/base.py" in get_response
Exception Type: ConnectionError at / Exception Value: Error 111 connecting localhost:6379. Connection refused.
Ok, this time you're having trouble with redis, which is the (server-side) in-memory caching library. You probably need to start the redis server manually. I'm trying out an afterflight install from a clean slate now.
Could you try installing redis, either using apt-get install redis-server
or following http://redis.io/topics/quickstart , and then let me know if you have further errors?
Thanks again for the quick respose!
*** EDIT: I attempted to attach a dataflash file that won't work with Afterflight. I can't attach files except images. Is there a place I could send it to?
Installing redis-server solved that issue. Got a couple more for you now. :)
The instructions state that dataflash logs are better supported than Mission Planner tlogs. I have attempted to upload dataflash logs from ArduPlane 3.0.2beta. No joy. I get an error:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')
Traceback: File "/home/maday/.local/lib/python2.7/site-packages/Django-1.6.4-py2.7.egg/django/core/handlers/base.py" in get_response
Exception Type: IndexError at /upload Exception Value: list index out of range
This is now a rather long post, so I'll put the other issue in a separate post.
Note that I am unable to attach any files except images to these posts. Is there a place I could send the dataflash file in question to you? Are you e.g., on DIYDrones.com and I could msg you there?
So, I am able to successfully upload tlogs from MAVProxy.
After the upload the page layout looks nothing like it does on your afterflight web site. I'm attaching screen shots. I also can't get the graph plot or time line to work.
Thanks ahead of time,
Michael
@mday299, I'm http://diydrones.com/profile/AaronCurtis , feel free to ping me there. Looks like it isn't displaying properly because it can't find your .css files. This has to do with the lines
url(r'^(media)/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT, 'show_indexes':True
}),
In urls.py, which serve the files during development. That part is working fine on my install. I see that I've hard-coded it to look for the .css at /media/css/ . If you go to http://localhost:8000/media/ , do you see a directory listing?
As for the 3.0.x dataflash log not working, that will be because I haven't done any work on afterflight since 2.6 and I guess the format has changed. I also have never tried it with Pixhawk or PX4 logs. I just started a new issue for that: https://github.com/foobarbecue/afterflight/issues/7
Thanks for your patience; it's very helpful for me have you testing this.
Wow, that was one fast reply. Thanks for you attention!
The directory listing for /media only has a "logs" folder in it. No css folder. Could be because of the rather unconventional install I've had to do.
Yeah, my planes are all flying PX4 or Pixhawk, that's possibly another confounding factor with the dataflash log upload.
Aaron,
I posted the dataflash log attached to a comment on your wall at diydrones.com
See here:
Based on your previous comment, I hunted around for the css folder. I found it in the afferflight/media folder. I found that if I do something different than what the developer instructions say and run the server out of the afterflight folder instead of its parent folder the css works, and the map and the plots start working.
So, looks like just some tweaking of the developer instructions might solve most of this.
Awesome!
Hi Michael, glad you got it working. I edited the readme in 7a5cd4acf8fa25abea33033e147f7f8e54bf3bf0 -- did I get it right? Would love it if you could fix it up some more and submit a pull request. Really need to simplify the install process but documenting it correctly would be a good start.
Howdy.
I tried to the developer install on Ubuntu 14.04 today. Install instructions are (understandably) possibly slightly incorrect as they are likely intended for older versions of Ubuntu.
I tried 'pip -r ./afterflight/requirements.txt'
and pip informed me one cannot run '-r' with pip.
So I tried the install incantation I use with MAVProxy and MAVLink:
python setup.py build install --user
This appeared to work and a LOT of text went by. :)
I setup the sqllite database fired up the server as instructed. This also appeared to work.
I pointed my browser at localhost:8000 and that also worked. However, when I attempt to login I get a page stating:
BEGIN
ImproperlyConfigured at /accounts/login/
No Facebook app configured: please add a SocialApp using the Django admin
Request Method: GET Request URL: http://localhost:8000/accounts/login/ Django Version: 1.6.4 Exception Type: ImproperlyConfigured Exception Value:
No Facebook app configured: please add a SocialApp using the Django admin
Exception Location: /home/maday/.local/lib/python2.7/site-packages/django_allauth-0.16.1-py2.7.egg/allauth/socialaccount/providers/facebook/provider.py in media_js, line 106
END
There is more on the error page if you'd like, but that's probably sufficient for this post.
Help?
Thanks,
Michael