Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError raised in the create_instance management command when passing a --geojson argument #3170

Open
jwalgran opened this issue Jul 18, 2017 · 0 comments
Labels

Comments

@jwalgran
Copy link
Contributor

  • Save the JSON below as pa.json and make it available on the app VM.
  • Run the create instance command
./manage.py create_instance geojsontest --url_name=geojsontest --user={your-username} --geojson=/path/to/pa.json

A TypeError is thrown

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/usr/local/otm/app/opentreemap/treemap/management/commands/create_instance.py", line 80, in handle
    geom = GEOSGeometry(open(options['geojson'], srid=4326).read())
TypeError: 'srid' is an invalid keyword argument for this function


pa.json

{
    "type": "MultiPolygon",
    "coordinates": [[
        [
            [
                -80.947265625,
                39.30029918615029
            ],
            [
                -73.740234375,
                39.30029918615029
            ],
            [
                -73.740234375,
                42.61779143282346
            ],
            [
                -80.947265625,
                42.61779143282346
            ],
            [
                -80.947265625,
                39.30029918615029
            ]
        ]
    ]]
}
@jwalgran jwalgran added the bug label Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant