johnsu01 (johnsu01) wrote,
johnsu01
johnsu01

  • Music:

Dreamhost and Django

Anyone trying to set up a Django app on Dreamhost where any model uses FloatField should be advised of this ticket. It kept me up a while.

The exception is a TypeError with value "float argument required".

It's not a Dreamhost-specific thing obviously. It's a MySQL 5.0.3+ specific thing. I'm just mentioning Dreamhost because that's how it bit me --- I was only testing with MySQL 4 on my laptop, and they have 5.0.16 installed. You can tell I'm new at this, testing on a different version of database than what will be used. Lesson learned.

The bug was actually in the mysql-python bindings. There is a fix from upstream, details are in the ticket thread.

(Thanks to malcomt for the help tracking it down.)

Update: Is it not strange that Dreamhost doesn't seem to have the python dev packages installed? It seems I may not be able to locally install the new mysql-python without locally installing um, python:

[centinela]$ pwd
/home/fanfatale/src/MySQLdb
[centinela]$ python setup.py install --root=$HOME
running install
error: invalid Python installation: unable to open /usr/lib/python2.3/config/Makefile (No such file or directory)
Tags: django, dreamhost, mysql, python, web development
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments