Calling cassandra.cluster.Session.prepare or cassandra.cluster.Session.prepare_on_all_hosts creates a ResponseFuture that is passed an instance of PrepareMessage as it's message value. This message value is used in a few places in that class as self.message.consistency_level, however a PrepareMessage object does not have that property. The ResponseFuture._retry method would set the consistency_level property on that object, however that method is not called until after an attempt to access the property.
See here for the core of the issue: https://github.com/datastax/python-driver/blob/3.20.2/cassandra/cluster.py#L4108-L4111
The stack trace we've seen is: