For reference, I've been primarily using these 2 resources
AttributeError: 'UUID' object has no attribute 'replace' when using backend-agnostic GUID type https://websauna.org/docs/narrative/modelling/models.html#uuid-primary-keys
which seem to show that the issue is resolved though I can't seem to get it to work on my end.
My error is the same as in the SO post above but for thoroughness here it is:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/uuid.py", line 137, in __init__
hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'UUID' object has no attribute 'replace'
My model is as follows:
import sqlalchemy
from .base import Base
from sqlalchemy import Column
from sqlalchemy.dialects.postgresql import UUID
class ModelItem(Base):
__tablename__ = 'item'
id = Column(UUID(as_uuid=True),
server_default=sqlalchemy.text("uuid_generate_v4()"),
primary_key=True,
nullable=False)
Are there other known work arounds?