Skip to content

Checking for None for 'sneakerhead-ru' script #54

Description

@Very1Fake

Code: 40903 (FATAL)
Source: Log from production server (by CatalogWorker)

sneakerhead-ru: AttributeError: 'NoneType' object has no attribute 'xpath'
================================
Traceback (most recent call last):
  File "/var/sftp/files/monitor/source/core.py", line 301, in execute
    result: list = script_manager.execute_parser(task.script, 'execute', (mode, task))
  File "/var/sftp/files/monitor/source/scripts.py", line 592, in execute_parser
    raise e
  File "/var/sftp/files/monitor/source/scripts.py", line 581, in execute_parser
    return getattr(self.get_parser(name), func)(*args)
  File "/var/sftp/files/monitor/scripts/sneakerhead_ru/__init__.py", line 54, in execute
    catalog = [element for element in etree.HTML(response.text).xpath('//div[@class="product-cards__item"]')]
AttributeError: 'NoneType' object has no attribute 'xpath'
================================

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions