Sneaker-Monitors icon indicating copy to clipboard operation
Sneaker-Monitors copied to clipboard

Shopify Monitor Error "IndexError: list index out of range"

Open king1267 opened this issue 3 years ago • 3 comments

When I run Shopify monitor using DTLR and ShoePalace's URL with /products.json at the end I get this repeated error saying "IndexError: list index out of range"

To Reproduce Steps to reproduce the behavior:

  1. Go to '.env'
  2. Replace webhook with "mywebhook", Location to "US", and URL to "https://www.dtlr.com/products.json and another to https://www.shoepalace.com/products.json"
  3. Run Shopifymonitor.py
  4. Get this error: Exception found: Traceback (most recent call last): File "C:\Users\dnmpl\Downloads\Sneaker-Monitors-master\DTLR\DTLRMonitor.py", line 199, in monitor items = scrape_site(CONFIG['URL'], proxy, headers) File "C:\Users\dnmpl\Downloads\Sneaker-Monitors-master\DTLR\DTLRMonitor.py", line 52, in scrape_site 'image': product['images'][0]['src'], IndexError: list index out of range

Screenshots bfbbbb

Desktop (please complete the following information):

  • OS: [Windiows]
  • Browser [chrome]
  • Version [e.g. 22]

king1267 avatar Nov 21 '21 01:11 king1267

I imagine this is happening because one of the products in products.json doesn't have an image. To verify this, you can change the url to a products.json of a single product that does have an image, and see if it works then.

delamae avatar Nov 21 '21 11:11 delamae

Yes, @delamae is right, the error is shown due to a product not having an image. I will let Yasser know about the issue or even commit a fix for this error.

kacperkwapisz avatar Nov 21 '21 14:11 kacperkwapisz

Hey. Did u actually download the monitors. And they worked?

flyingymnast avatar Jan 18 '23 16:01 flyingymnast