Pickle Save Dict
Posted: Fri Jun 03, 2016 8:44 am
Hey,
I currently worked on a script which edits a map so I can delete specific models which are in the zone.
However
my Dict looks like this:
When I want to save it via this script (which worked on 2.5)
Im getting
I currently worked on a script which edits a map so I can delete specific models which are in the zone.
However
my Dict looks like this:
Syntax: Select all
removeDict = {'mg_course_dev_server': {'deletelist': [], 'deleteCoords': [(Vector(-385.1864318847656, 3057.462646484375, 22.29857063293457), Vector(-144.25393676757812, 3600.712646484375, -31.96875), Vector(-468.97247314453125, 2856.05029296875, 43.889564514160156), Vector(0.0, -95.67604064941406, 0.0))]}}
When I want to save it via this script (which worked on 2.5)
Syntax: Select all
def saveDict():
fileStream = open(mapsPath, 'wb')
pickle.dump(removeDict, fileStream)
fileStream.close()
Im getting
Code: Select all
RuntimeError: Pickling of '_mathlib.Vector' instances is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html)