Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
king1267 opened this issue Nov 21, 2021 · 3 comments
Open

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

king1267 opened this issue Nov 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@king1267
Copy link

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]
@delamae
Copy link

delamae commented Nov 21, 2021

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.

@kacperkwapisz
Copy link
Collaborator

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.

@yasserqureshi1 yasserqureshi1 added the bug Something isn't working label May 23, 2022
@flyingymnast
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants