-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
tests/reservation_test.py:1: in <module>
from ***.reservation import Reservation, Traveler, TravelerType
***/reservation.py:83: in <module>
class Traveler(Base):
***/reservation.py:102: in Traveler
type = Column(EnumType(TravelerType), nullable=False)
../../.virtualenvs/***/lib/python3.5/site-packages/sqlalchemy_enum34.py:39: in __init__
super(Enum, self).__init__(*enumerants, **options)
../../.virtualenvs/***/lib/python3.5/site-packages/sqlalchemy/sql/type_api.py:706: in __init__
self.impl = to_instance(self.__class__.impl, *args, **kwargs)
../../.virtualenvs/***/lib/python3.5/site-packages/sqlalchemy/sql/type_api.py:1162: in to_instance
return typeobj(*arg, **kw)
../../.virtualenvs/***/lib/python3.5/site-packages/sqlalchemy/sql/sqltypes.py:1135: in __init__
length = max(len(x) for x in self.enums)
../../.virtualenvs/***/lib/python3.5/site-packages/sqlalchemy/sql/sqltypes.py:1135: in <genexpr>
length = max(len(x) for x in self.enums)
E TypeError: object of type 'int' has no len()class TravelerType(enum.Enum):
adult = 1
child = 2
baby = 3
class Traveler(Base):
type = Column(EnumType(TravelerType), nullable=False)아무래도 예외처리를 해줘야 할 것 같습니다.
Metadata
Metadata
Assignees
Labels
No labels