inspectdb traceback

25 views
Skip to first unread message

christia...@itsv.at

unread,
Feb 1, 2019, 7:50:11 AM2/1/19
to Django users

while trying to build an app around an existing database, inspectdb bails out on me. the server is running fine and says "0 errors found". any ideas ?

root@lpgaixmgmtlx01:/root/django/aixregistry_nxt>./manage.py runserver 0.0.0.0:8000
Validating models...

0 errors found
February 01, 2019 - 12:41:31
Django version 1.6.11.7, using settings 'aixregistry_nxt.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.




root@lpgaixmgmtlx01:/root/django/aixregistry_nxt>./manage.py inspectdb
Traceback (most recent call last):
 
File "./manage.py", line 10, in <module>
    execute_from_command_line
(sys.argv)
 
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility
.execute()
 
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
   
self.fetch_command(subcommand).run_from_argv(self.argv)
 
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
   
self.execute(*args, **options.__dict__)
 
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output
= self.handle(*args, **options)
 
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
   
return self.handle_noargs(**options)
 
File "/usr/lib/python2.7/site-packages/django/core/management/commands/inspectdb.py", line 27, in handle_noargs
   
for line in self.handle_inspection(options):
 
File "/usr/lib/python2.7/site-packages/django/core/management/commands/inspectdb.py", line 40, in handle_inspection
    cursor
= connection.cursor()
 
File "/usr/lib/python2.7/site-packages/django/db/backends/__init__.py", line 160, in cursor
    cursor
= self.make_debug_cursor(self._cursor())
 
File "/usr/lib/python2.7/site-packages/django/db/backends/__init__.py", line 132, in _cursor
   
self.ensure_connection()
 
File "/usr/lib/python2.7/site-packages/django/db/backends/__init__.py", line 127, in ensure_connection
   
self.connect()
 
File "/usr/lib/python2.7/site-packages/django/db/backends/__init__.py", line 115, in connect
   
self.connection = self.get_new_connection(conn_params)
 
File "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 437, in get_new_connection
    conn
.encoders[SafeBytes] = conn.encoders[bytes]
KeyError: <type 'str'>
Enter code here...


Tim Graham

unread,
Feb 1, 2019, 9:45:15 AM2/1/19
to Django users
You must use an older version of mysqlclient for such an old (and unsupported) version of Django.

christia...@itsv.at

unread,
Feb 1, 2019, 9:48:43 AM2/1/19
to Django users
well ,this is the version which "pip install django" delivered to me, it was not indentionally installed. how to get a "new" version via pip?

Tim Graham

unread,
Feb 1, 2019, 3:55:13 PM2/1/19
to Django users
Now I see you have 1.6.11.7 which isn't an official Django release -- it looks like it may have come from your Linux distribution rather than from PyPI.
Reply all
Reply to author
Forward
0 new messages