I use fiona 1.7.7, and get this error while trying to read a file:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-808ca663d5ec> in <module>()
----> 1 d = fiona.open('data.json', driver='GeoJSON')
c:\python36\lib\site-packages\fiona\__init__.py in open(path, mode, driver, schema, crs, encoding, layer, vfs, enabled_drivers, crs_wkt)
171 c = Collection(path, mode, driver=driver, encoding=encoding,
172 layer=layer, vsi=vsi, archive=archive,
--> 173 enabled_drivers=enabled_drivers)
174 elif mode == 'w':
175 if schema:
c:\python36\lib\site-packages\fiona\collection.py in __init__(self, path, mode, driver, schema, crs, encoding, layer, vsi, archive, enabled_drivers, crs_wkt, **kwargs)
151 if self.mode == 'r':
152 self.session = Session()
--> 153 self.session.start(self)
154 elif self.mode in ('a', 'w'):
155 self.session = WritingSession()
fiona\ogrext.pyx in fiona.ogrext.Session.start (fiona/ogrext.c:8459)()
fiona\_err.pyx in fiona._err.GDALErrCtxManager.__exit__ (fiona/_err.c:1809)()
fiona\_err.pyx in fiona._err.CPLE_BaseError.__init__ (fiona/_err.c:1242)()
TypeError: __init__() takes exactly 4 positional arguments (2 given)
@klonuo this issue is related to #455 in that the GDAL error we want to see is hidden by a Fiona bug. #456 will fix the Fiona bug and let us see what the actual problem with your data and code is. I'm going to schedule a release with this fix in the next day or two.
@klonuo I'd be much obliged if you could try the new 1.7.8.
@sgillies sorry for the delay, was on vacation...
now works as expected
thanks :)
Most helpful comment
@sgillies sorry for the delay, was on vacation...
now works as expected
thanks :)