yasserqureshi1 / Sneaker-Monitors

A collection of web monitors that notify of restocks or updates on sneaker related sites through Discord Webhook. This includes Shopify, Nike SNKRS (supports 42 countries), Supreme and now Footsite monitors!
GNU General Public License v3.0
462 stars 126 forks source link

attribute error #35

Closed DarylRob closed 3 years ago

DarylRob commented 3 years ago

Hi again, i've got another issue on the shopify monitor after it was seemingly working okay.

['Nike Air Jordan 1 Mid', [['UK 8 : US 9']], 'https://cdn.shopify.com/s/files/1/2031/6995/products/554724074_1.jpg?v=1606411683', 'nike-air-jordan-1-mid-554724074']
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 174, in <module>
    ShopifyMonitor(url=CONFIG['URL'], webhook=CONFIG['WEBHOOK'], proxy=CONFIG['PROXY']).monitor()
  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 166, in monitor
    self.discord_webhook(product_item)
  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 89, in discord_webhook
    description = description + str(product_item[1][i].replace(' : ', '/')) + '\t\t'
AttributeError: 'list' object has no attribute 'replace'

Looks like its trying to replace something on a list?? which it cant do?

yasserqureshi1 commented 3 years ago

Hi again, i've got another issue on the shopify monitor after it was seemingly working okay.


['Nike Air Jordan 1 Mid', [['UK 8 : US 9']], 'https://cdn.shopify.com/s/files/1/2031/6995/products/554724074_1.jpg?v=1606411683', 'nike-air-jordan-1-mid-554724074']

Traceback (most recent call last):

  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 174, in <module>

    ShopifyMonitor(url=CONFIG['URL'], webhook=CONFIG['WEBHOOK'], proxy=CONFIG['PROXY']).monitor()

  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 166, in monitor

    self.discord_webhook(product_item)

  File "C:\Users\Administrator\Desktop\Sneaker-Monitors-master\Shopify\ShopifyMonitor.py", line 89, in discord_webhook

    description = description + str(product_item[1][i].replace(' : ', '/')) + '\t\t'

AttributeError: 'list' object has no attribute 'replace'

Looks like its trying to replace something on a list?? which it cant do?

Thanks for raising this issue. This is strange and I haven't come across this. I'll have a look into it but it may take me a while as I am very busy over the next few weeks.

DarylRob commented 3 years ago

I think I've sorted it simply by converting it to a string before the replace method. I'm running it again but won't know until a notification is being sent if it's working.

yasserqureshi1 commented 3 years ago

The embeded description in the Shopify monitor needs to be sorted out anyway. This is now on my to-do list

yasserqureshi1 commented 3 years ago

I've cleaned up the description. This should not occur anymore