Skip to content

Instantly share code, notes, and snippets.

@ronaldgreeff
Created June 28, 2019 15:31
Show Gist options
  • Save ronaldgreeff/79da4a92fa63572466e64da68b9f7187 to your computer and use it in GitHub Desktop.
Save ronaldgreeff/79da4a92fa63572466e64da68b9f7187 to your computer and use it in GitHub Desktop.
https://www.boots.com/
['Beauty | Health | Pharmacy and Prescriptions - Boots']
['body: 3', 'images: 48', 'links: 1543', 'meta_tags: 15', 'texts: 138', 'titles: 1', 'url: 22']
Traceback (most recent call last):
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2936, in execute_sql
cursor.execute(sql, params or ())
sqlite3.IntegrityError: UNIQUE constraint failed: selecclass_selector_through.selecclass_id, selecclass_selector_through.selector_id
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "db_manager.py", line 442, in <module>
store(url=url, site=site, screenshot=screenshot, extract=extract)
File "db_manager.py", line 409, in store
handle_selectors(data_block_objs, all_data_blocks[1:])
File "db_manager.py", line 347, in handle_selectors
Selector.selector_classes.add(class_obj)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 6810, in add
accessor.through_model.insert_many(inserts).execute()
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 1778, in inner
return method(self, database, *args, **kwargs)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 1849, in execute
return self._execute(database)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2567, in _execute
return super(Insert, self)._execute(database)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2316, in _execute
cursor = database.execute(self)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2949, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2943, in execute_sql
self.commit()
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2725, in __exit__
reraise(new_type, new_type(*exc_args), traceback)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "C:\h\envs\mlpricecomp\lib\site-packages\peewee.py", line 2936, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: UNIQUE constraint failed: selecclass_selector_through.selecclass_id, selecclass_selector_through.selector_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment