[#233] empty shapefile produces an error

Date:
2006-11-13 08:37
Priority:
1
State:
Open
Submitted by:
Didrik Pinte (dpinte)
Assigned to:
Nobody (None)
Category:
none
Version:
none
Resolution:
none
Summary:
empty shapefile produces an error

Detailed description
Opening an empty shapefile works fine, but when you try to move on the map, you get the following error :

Traceback (most recent call last):
File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/view.py", line 202, in _do_redraw
if self.render_iter.next():
File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/view.py", line 251, in _render_iterator
for cont in renderer.RenderMapIncrementally():
File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/baserenderer.py ", line 191, in render_map_incrementally
for i in self.draw_shape_layer_incrementally(layer):
File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/baserenderer.py ", line 257, in draw_shape_layer_incrementally
for shape in self.layer_shapes(layer):
File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/renderer.py", l ine 320, in layer_shapes
return layer.ShapesInRegion((left, bottom, right, top))
File "/home/did/projets/python/thuban/current/thuban/test/../Thuban/Model/laye r.py", line 244, in ShapesInRegion
clipbbox = self.__mangle_bounding_box(bbox)
File "/home/did/projets/python/thuban/current/thuban/test/../Thuban/Model/laye r.py", line 336, in __mangle_bounding_box
lminx, lminy, lmaxx, lmaxy = self.LatLongBoundingBox()
TypeError: unpack non-sequence


I have to admit that it's not really smart to open empty shapefiles, but ... it happens sometimes ;-)
Message  ↓
Date: 2006-11-17 08:34
Sender: Bernhard Reiter

True. :)
Can you create a test function as next step?

No attached documents

No changes have been made to this item