Closed ghostzero192 closed 6 years ago
Solved, i compared the codegen.py with the one in the previous version and used the way it writes the models in the outfile: for model in self.models:
#print(model.render().rstrip('\n').encode('utf-8'), file=outfile)
print('\n\n' + model.render().rstrip('\n'), file=outfile)
replaced the commented lines with the last one
I am using the master release of the library, when i execute the flask-sqlacodegen it creates the outfile without errors but the models are writen like this:
b"class Ueb(Base):\n tablename = 'ueb'\n\n idueb = Column(Integer, primary_key=True, server_default=FetchedValue())\n nombre = Column(String(50), nullable=False)"
instead of the classes i am using python 3.6.2 and SQLAlchemy-1.1.11