On Nov 10, 9:12 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Nov 10, 1:36 am, Julien Phalip <jpha...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I've tried to install MySQL for an existing project, and I'm getting a
> > strange error (see traceback below). Apparently "self.converter" is
> > None, but I can't see why.
>
> > I can access the database just fine using the 'mysql' command in the
> > terminal or using PhpMyAdmin.
>
> > Do you know how this could be fixed?
>
> > Thanks a lot for you help.
>
> > Julien
>
> > Traceback (most recent call last):
> >   File "/Users/julien/Documents/Development/eclipse/workspace/
> > myproject/trunk/site/manage.py", line 13, in <module>
> >     execute_manager(settings)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/__init__.py", line 439, in execute_manager
> >     utility.execute()
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/__init__.py", line 380, in execute
> >     self.fetch_command(subcommand).run_from_argv(self.argv)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/base.py", line 195, in run_from_argv
> >     self.execute(*args, **options.__dict__)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/base.py", line 222, in execute
> >     output = self.handle(*args, **options)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/commands/runserver.py", line 84, in handle
> >     inner_run()
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/commands/runserver.py", line 48, in inner_run
> >     self.validate(display_num_errors=True)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/base.py", line 249, in validate
> >     num_errors = get_validation_errors(s, app)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/core/management/validation.py", line 67, in
> > get_validation_errors
> >     connection.validation.validate_field(e, opts, f)
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/db/backends/mysql/validation.py", line 15, in validate_field
> >     db_version = connection.get_server_version()
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/db/backends/mysql/base.py", line 297, in get_server_version
> >     self.cursor()
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/db/backends/__init__.py", line 81, in cursor
> >     cursor = self._cursor()
> >   File "/Users/julien/Documents/Development/eclipse/workspace/django/
> > django/db/backends/mysql/base.py", line 281, in _cursor
> >     self.connection = Database.connect(**kwargs)
> >   File "/opt/local/lib/python2.5/site-packages/MySQLdb/__init__.py",
> > line 81, in Connect
> >     return Connection(*args, **kwargs)
> >   File "/opt/local/lib/python2.5/site-packages/MySQLdb/
> > connections.py", line 222, in __init__
> >     self.converter[FIELD_TYPE.STRING].append((None, string_decoder))
> > TypeError: 'NoneType' object is unsubscriptable
>
> Looks like a problem with your database connection settings. Can you
> post the relevant bits from settings.py?
> --
> DR.

Hi Daniel,

Thanks for your reply. The settings seem to be fine I think:

DATABASE_ENGINE = 'mysql'           # 'postgresql', 'mysql', 'sqlite3'
or 'ado_mssql'.
DATABASE_NAME = 'testdb'             # Or path to database file if
using sqlite3.
DATABASE_USER = 'root'             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost.
Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not
used with sqlite3.

I've never come across that error before. And this code used to work
when I run it some months ago... I'm really at a loss here.

Thanks,

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

Reply via email to