#33643: KeyError when running manage.py inspectdb against an Oracle database.
-------------------------------------+-------------------------------------
               Reporter:  scott-8    |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  4.0
  (Management commands)              |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I'm getting the following error when using inspectdb with an Oracle
 database. The column in question  is a hidden column that's automatically
 created by the database, and doesn't need a model. The command runs fine
 if I add something to skip these columns. Here's a related issue in
 SQLAlchemy: https://github.com/sqlalchemy/sqlalchemy/issues/1513

 {{{
 Traceback (most recent call last):
   File "xxxx\envs\django\Scripts\manage.py-script.py", line 33, in
 <module>
     sys.exit(load_entry_point('hero', 'console_scripts', 'manage.py')())
   File "xxxx\__init__.py", line 17, in manage
     execute_from_command_line(sys.argv)
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\__init__.py", line 446, in
 execute_from_command_line    utility.execute()
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\__init__.py", line 440, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\base.py", line 414, in run_from_argv
     self.execute(*args, **cmd_options)
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\base.py", line 460, in execute
     output = self.handle(*args, **options)
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\commands\inspectdb.py", line 46, in handle
     for line in self.handle_inspection(options):
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\commands\inspectdb.py", line 226, in
 handle_inspection
     yield from self.get_meta(
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\commands\inspectdb.py", line 348, in
 get_meta
     str(tuple(column_to_field_name[c] for c in columns))
   File "xxxx\envs\django\lib\site-
 packages\django\core\management\commands\inspectdb.py", line 348, in
 <genexpr>
     str(tuple(column_to_field_name[c] for c in columns))
 KeyError: 'sys_nc00106$'
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33643>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018024a02164-53541705-3fa9-4459-bf5f-e8c89f477af1-000000%40eu-central-1.amazonses.com.

Reply via email to