From 54cd19ea0d0efd33cdf943b396820e5954642cad Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Tue, 8 Sep 2015 21:13:02 +0200 Subject: [PATCH] Geography : bug 8902 : ValueError: Place.set_name(name) requires a PlaceName() --- gramps/plugins/lib/maps/geography.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index 014b071e2..55ee70a3a 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -49,7 +49,7 @@ import cairo # Gramps Modules # #------------------------------------------------------------------------- -from gramps.gen.lib import EventType, Place, PlaceType, PlaceRef +from gramps.gen.lib import EventType, Place, PlaceType, PlaceRef, PlaceName from gramps.gen.display.name import displayer as _nd from gramps.gen.display.place import displayer as _pd from gramps.gui.views.navigationview import NavigationView @@ -951,8 +951,10 @@ class GeoGraphyView(OsmGps, NavigationView): (name, coords) = place latlong = coords.pop() (lat, lon) = latlong + place_name = PlaceName() + place_name.set_value(name) new_place = Place() - new_place.set_name(name) + new_place.set_name(place_name) new_place.set_title(name) new_place.set_latitude(str(lat)) new_place.set_longitude(str(lon))