“Click here” to design and build your UAV

This blog post summarizes the work I have been doing the past 8 months or so on an automated design system for (civillian) UAVs.  Ive been meaning to do this post for a long time but wanted the tools to be in a beta quality state before writing about them.  In good software engineering tradition there have been a few hiccups and detours along the way but Im happy to say beta stage has been reached.

I will go over the vision behind the system, its architecture, and the various tools I have used to put it together.  For the impatient, this is the idea: we need a system that allows us to rapidly go through this process:

Agile UAV design if you want to call it that. Tools I will talk about include PythonNumpy, RabbitMQ, Redis, Flask, Django, Bootstrap,  Knockout.jsVagrant and how they link up with application specific codes such as Ansys Fluent, SolidWorks, Vanguard and Anylogic.

This post is an extension of the talk I gave at PyConUK 2011 a couple of months ago and is also what I will cover in my upcoming talk at Imperial College and at the upcoming AIAA conference in Honolulu in April 2012.

Continue reading

“Site matching query does not exist” with djangoappengine & pydev

This has been driving me nuts all morning.  When trying to direct a login request to django.contrib.auth.views.login I get: Site matching query does not exist.  Other requests work ok…

All solutions I found related to the fact that the SITE_ID in settings.py did not match the id of the object in the database.  However, after manually verifying these were identical, trying to manually remove/add new site objects, flushing both the django and appengine datastores, it still would not work…

Up to then I was always starting the appengine server through pydev.  However, I was always running manage.py through a commandline prompt (to check the datastore).  Turns out that if I als run the server from the commandline (so not from pydev) and make sure the id’s match, it does work correctly!

Turns running from the commandline or pydev results in using a different database file (on windows at least, still need to test in linux). Running from the commandline creates files in .gaedata while pydev creates files in the users tmp directory.

Update: Turns out it was something silly.  In pydev my project was configured as a google appengine run, while it should have been a djangor run (django-nonrel will not work properly if you invoke the appengine server directly)

–Dirk