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

Fix ethnologue module #513

Closed
Androbin opened this issue Dec 12, 2019 · 2 comments
Closed

Fix ethnologue module #513

Androbin opened this issue Dec 12, 2019 · 2 comments

Comments

@Androbin
Copy link
Collaborator

Androbin commented Dec 12, 2019

======================================================================
ERROR: test_ethnologue (phenny.modules.test.test_ethnologue.TestEthnologue)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/apertium/phenny/modules/test/test_ethnologue.py", line 29, in test_ethnologue
    ethno.ethnologue(self.phenny, self.input)
  File "/home/travis/build/apertium/phenny/modules/ethnologue.py", line 85, in ethnologue
    if "macrolanguage" in h.find_class('field-name-a-language-of')[0].find('div/div/h2').text:
IndexError: list index out of range

======================================================================
ERROR: test_ethnologue_macrolanguage (phenny.modules.test.test_ethnologue.TestEthnologue)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/apertium/phenny/modules/test/test_ethnologue.py", line 36, in test_ethnologue_macrolanguage
    ethno.ethnologue(self.phenny, self.input)
  File "/home/travis/build/apertium/phenny/modules/ethnologue.py", line 85, in ethnologue
    if "macrolanguage" in h.find_class('field-name-a-language-of')[0].find('div/div/h2').text:
IndexError: list index out of range
@mr-martian
Copy link

When I run this test locally it works, so I wonder if this is maybe connected to Ethnologue having page view limits (I'm on college wifi so it's not limited)?

@mr-martian
Copy link

Since all the scraper is looking for is codes and names, we could change it to only requesting https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants