the-scouts / compass-interface-core

Core bridge/crawler component for Compass-Interface
5 stars 1 forks source link

Error accessing personal information #90

Closed trodaway closed 3 years ago

trodaway commented 3 years ago

Exception is raised when trying to access personal information of members within my hierarchy. Nothing raised when accessing my own information though. I believe my role doesn't give me access to my hierarchy's disabilities/qualifications/hobbies ("other sections") information within Compass, so I think this is a case that needs handling to prevent the error.

Traceback (most recent call last):
  File "<input>", line 3, in <module>
  File "<path_to_project>\venv\lib\site-packages\compass\core\people.py", line 43, in personal
    return self._scraper.get_personal_tab(membership_number)
  File "<path_to_project>\venv\lib\site-packages\compass\core\_scrapers\member.py", line 266, in get_personal_tab
    details["disabilities"] = {k: v for k, _, v in (row[0][0].text.partition(" - ") for row in div_profile_tbl[9][2])}
  File "src\lxml\etree.pyx", line 1161, in lxml.etree._Element.__getitem__
IndexError: list index out of range
AA-Turner commented 3 years ago

Hi Tim,

Could you email me with the role you're logging in with at my firstname . surname at scouts.org.uk please?

Thanks, Adam

AA-Turner commented 3 years ago

Closed in #91