Estoy usando userType pero obtengo este error
Traceback (most recent call last):
File "cassandra-test.py", line 70, in <module>
sync_type(Image)
TypeError: sync_type() missing 1 required positional argument: 'type_model'
El código que estoy usando es:
from cassandra.cqlengine import columns
from cassandra.cqlengine import connection
from cassandra.cqlengine.management import sync_table, sync_type
class Image(UserType):
path_to_images = columns.Text()
images = columns.Map(columns.Text(), columns.Text())
class User(Model):
__table_name__ = 'auth_user'
id = columns.TimeUUID(primary_key=True, default=uuid.uuid4)
firstName = columns.Text()
lastName = columns.Text()
email = columns.Text()
password = columns.Text()
images = columns.UserDefinedType(Image)
sync_type(Image)
sync_table(User)