Traceback (most recent call last):


 "bug.py", line 32, in <module>

q = q.options(opt)


 "./sqlalchemy/orm/query.py", line 1523, in options

return self._options(False, *args)


 "<string>", line 2, in _options


 "./sqlalchemy/orm/base.py", line 220, in generate

fn(self, *args[1:], **kw)


 "./sqlalchemy/orm/query.py", line 1542, in _options

opt.process_query(self)


 "./sqlalchemy/orm/strategy_options.py", line 168, in process_query

self._process(query, True)


 "./sqlalchemy/orm/strategy_options.py", line 526, in _process

raiseerr,


 "./sqlalchemy/orm/strategy_options.py", line 704, in _bind_loader

raiseerr,


 "./sqlalchemy/orm/strategy_options.py", line 253, in _generate_path

attr.parent, path[-1]


 "./sqlalchemy/orm/util.py", line 1269, in _entity_corresponds_to_use_path_impl

or given in entity._with_polymorphic_entities
AttributeError: 'Mapper' object has no attribute '_with_polymorphic_entities'

Traceback (most recent call last):


 "generate_tfrecord.py", line 102, in <module>

tf.app.run()


 "D:\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run

_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)


 "D:\Anaconda3\envs\tensorflow1\lib\site-packages\absl\app.py", line 300, in run

_run_main(main, args)


 "D:\Anaconda3\envs\tensorflow1\lib\site-packages\absl\app.py", line 251, in _run_main

sys.exit(main(argv))


 "generate_tfrecord.py", line 93, in main

tf_example = create_tf_example(group, path)


 "generate_tfrecord.py", line 67, in create_tf_example

classes_text.append(row['class'].encode('utf8'))
AttributeError: 'int' object has no attribute 'encode'
