karta icon indicating copy to clipboard operation
karta copied to clipboard

TypeError: __init__() got an unexpected keyword argument 'enforce_poly_winding'

Open digitaltopo opened this issue 6 years ago • 1 comments

Attempting to import karta

import karta

throws following TypeError:

TypeError: __init__() got an unexpected keyword argument 'enforce_poly_winding'

Looks like the enforce_poly_winding keyword arg was appropriately removed in the 0.9.0 release by https://github.com/fortyninemaps/karta/commit/81a5c6a7048575bea2b6005b33d22f1e62e17b8f due to the update in picogeojson 0.7.0 https://github.com/fortyninemaps/picogeojson/commit/181879e7211acfb8602ad508143c59937f72dfef#diff-ecd1078854dc5584f72f87835e5741c0

Doesn't seem like the 0.9.0 code made it's way to pip correctly... Is there some issue with the 0.9.0 release on PyPi?

Observed on:

  • Karta version: 0.9.0
  • Picogeojson version 0.7.0
  • Python 3.6
  • Environment: Anaconda, Ubuntu 18.04

Full stack trace:

TypeError                                 Traceback (most recent call last)
<ipython-input-2-eb20076a4bd2> in <module>()
----> 1 import karta

~/.applications/anaconda3/envs/geo3/lib/python3.6/site-packages/karta/__init__.py in <module>()
      8 from .version import __version__
      9 
---> 10 from . import vector
     11 from . import raster
     12 from . import crs

~/.applications/anaconda3/envs/geo3/lib/python3.6/site-packages/karta/vector/__init__.py in <module>()
      9 numbers.Integral.register(numpy.integer)
     10 
---> 11 from . import geometry
     12 from . import quadtree
     13 from . import rtree

~/.applications/anaconda3/envs/geo3/lib/python3.6/site-packages/karta/vector/geometry.py in <module>()
     12 import numpy as np
     13 from .decorators import cache_decorator
---> 14 from ._geojson import GeoJSONOutMixin
     15 from ._shp import ShapefileOutMixin
     16 from .table import Table, Indexer

~/.applications/anaconda3/envs/geo3/lib/python3.6/site-packages/karta/vector/_geojson.py in <module>()
     15         return {'type': 'link', 'properties': {'href': "", 'type': 'proj4'}}
     16 
---> 17 class GeoJSONOutMixin(object):
     18     """ Mixin class to be added to geometry objects, adding geojson
     19     functionality.

~/.applications/anaconda3/envs/geo3/lib/python3.6/site-packages/karta/vector/_geojson.py in GeoJSONOutMixin()
     21 
     22     _serializer = picogeojson.Serializer(antimeridian_cutting=False,
---> 23                                          enforce_poly_winding=False)
     24 
     25     @staticmethod

TypeError: __init__() got an unexpected keyword argument 'enforce_poly_winding'

digitaltopo avatar Nov 23 '18 09:11 digitaltopo

Hi @digitaltopo,

Unfortunately, karta doesn't support picogeojson 0.7 right now, because the API in picogeojson changed a bit. The supported versions of dependencies are here: https://github.com/fortyninemaps/karta/blob/4ffaed5b25742ea836fd4f971e73314c72064b2e/requirements.txt#L4

I'd be interested in updating karta, but would probably want to do some basic checks for performance regressions on picogeojson first.

What's the issue with the 0.9.0 source bundle on PyPI?

njwilson23 avatar Nov 24 '18 01:11 njwilson23