Database insertion fails without error with scrapy

前端 未结 2 400
Happy的楠姐
Happy的楠姐 2021-01-25 18:41

I\'m working with scrapy and dataset (https://dataset.readthedocs.io/en/latest/quickstart.html#storing-data) which is a layer on top of sqlalchemy , trying to load data

2条回答
  •  自闭症患者
    2021-01-25 19:13

    Maybe some problems with the Db connection. Put your this snippet into a try except to check for the problem.

    try:
       db_path = "sqlite:///"+settings.SETTINGS_PATH+"\\data.db"
       db = dataset.connect(db_path)
       self.table = db[table_name].table
    except Exception:
       traceback.exec_print()
    

提交回复
热议问题