Opened 11 years ago

Closed 11 years ago

#21716 closed Bug (fixed)

The ogrinpsect management command throws TypeError

Reported by: Marco Badan <info@…> Owned by: Claude Paroz
Component: GIS Version: dev
Severity: Normal Keywords: geodjango, gis, postgis, ogrinpsect, management, manage.py
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Running the ogrinpsect management command (https://docs.djangoproject.com/en/dev/ref/django-admin/#ogrinspect) throws TypeError.

Traceback:

$ python manage.py ogrinspect ../resources/confini/regioni/reg2011_g/reg2011_g.shp TestModel
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/marco/.virtualenvs/test/src/django/django/core/management/__init__.py", line 427, in execute_from_command_line
    utility.execute()
  File "/home/marco/.virtualenvs/test/src/django/django/core/management/__init__.py", line 419, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/marco/.virtualenvs/test/src/django/django/core/management/base.py", line 244, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/marco/.virtualenvs/test/src/django/django/core/management/base.py", line 291, in execute
    output = self.handle(*args, **options)
  File "/home/marco/.virtualenvs/test/src/django/django/contrib/gis/management/commands/ogrinspect.py", line 105, in handle
    output = [s for s in _ogrinspect(ds, model_name, **options)]
TypeError: _ogrinspect() got an unexpected keyword argument 'no_color'

Reproduce the bug

  1. Follow the Geodjango tutorial for Django dev https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/
  2. Execute ogrinspect https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#try-ogrinspect

Notes

I've done a quick search and this is the commit that adds the no_color option https://github.com/django/django/commit/7b57e575c94691e40533e84d84235a0c6c90ab7b

Change History (2)

comment:1 by Claude Paroz, 11 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In d0eeddd6fcd93b23bb632ad3ea95ae3f871907e3:

Fixed #21716 -- Only passed arguments supported by ogrinspect

Thanks Marco Badan for the report.

Note: See TracTickets for help on using tickets.
Back to Top