Skip to content
Advertisement

Sqlalchemy raise ‘NotImplementedError: Operator ‘getitem’ is not supported on this expression’ When use ‘hybrid_property’ in mysql.SET

Hello everyone:

I success to create ‘user’ table, but failed to add ‘user’ to table.

python version: 3.7.2

SQLAlchemy 1.3.18

  • create permission enum
JavaScript
  • declare ‘user’ table
JavaScript
  • add one ‘user’ to table
JavaScript
  • raise exception
JavaScript

Do you have any good ideas?

Advertisement

Answer

I think it has been instantiated to be an ‘my.SET’ object before assign so that ‘hybird_property’ is called. The object likes ‘None’, it can’t be Iterated. I use below code to check it.

JavaScript

It works. Do you think it’s okay to do this?

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement