将字典分配为类属性

I have a class Itinerary that has two attributes: destinations and startTime

There is an equal chance between two itineraries (opt1 and opt2) for destinations which are both dictionaries with destinations as keys and day of visiting (0,1,...n) as values.

There is also an equal chance between startTime being datetime(2020,1,1,12,0,0) and datetime(2020,1,1,9,0,0)

这是我的代码:

class Itinerary:
    def __init__(self, destinations, startTime):
        self.destinations = np.random.choice(list(destinations), p = list(destinations.values()))
        self.startTime = np.random.choice(list(startTime), p = list(startTime.values()))
                
destinations = { opt1 : 0.5, opt2 : 0.5 }

startTime = { datetime(2020,1,1,12,0,0) : 0.5, datetime(2020,1,1,9,0,0) : 0.5 }

d = Itinerary(destinations, startTime)

But I get the error: TypeError: unhashable type 'dict'

How can I assign a dictionary as a class attribute? I have the feeling it has something to do with np.random.choice in the function but I haven't figured it out.