数据库连接
创建数据库这一块一直出现这个问题,一直不知道要怎么解决?有会的大神可以帮忙以下吗
D:\python\imooc_lagou\venv\Scripts\python.exe D:/python/imooc_lagou/create_lagou_tables.py
Traceback (most recent call last):
File "D:/python/imooc_lagou/create_lagou_tables.py", line 17, in <module>
class Lagoutables(Base):
File "D:\python\imooc_lagou\venv\lib\site-packages\sqlalchemy\ext\declarative\api.py", line 75, in __init__
_as_declarative(cls, classname, cls.__dict__)
File "D:\python\imooc_lagou\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py", line 131, in _as_declarative
_MapperConfig.setup_mapping(cls, classname, dict_)
File "D:\python\imooc_lagou\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py", line 160, in setup_mapping
cfg_cls(cls_, classname, dict_)
File "D:\python\imooc_lagou\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py", line 192, in __init__
self._setup_inheritance()
File "D:\python\imooc_lagou\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py", line 589, in _setup_inheritance
"table-mapped class." % cls
sqlalchemy.exc.InvalidRequestError: Class <class '__main__.Lagoutables'> does not have a __table__ or __tablename__ specified and does not inherit from an existing table-mapped class.