Page MenuHomePhabricator

Travis fails on test_page_from_repository (TestPageFromWikibase, TestCategoryFromWikibase)
Closed, DuplicatePublic

Description

https://travis-ci.org/wikimedia/pywikibot/jobs/640945625#L1722

___________ TestCategoryFromWikibase.test_page_from_repository_de_wp ___________

self = <tests.site_tests.TestCategoryFromWikibase testMethod=test_page_from_repository_de_wp>

    def wrapped_method(self):

        sitedata = self.sites[key]

        self.site_key = key

        self.family = sitedata['family']

        self.code = sitedata['code']

        self.site = sitedata['site']

>       func(self, key)

tests/aspects.py:748: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tests/site_tests.py:3787: in test_page_from_repository

    page = site.page_from_repository(self.ITEM)

pywikibot/site.py:2814: in page_from_repository

    dp = pywikibot.ItemPage(repo, item)

pywikibot/page.py:4422: in __init__

    ns = site.item_namespace

pywikibot/site.py:7668: in item_namespace

    self._item_namespace = self.get_namespace_for_entity_type('item')

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = DataSite("wikidata", "wikidata"), entity_type = 'item'

    def get_namespace_for_entity_type(self, entity_type):

        """

        Return namespace for given entity type.

    

        @return: corresponding namespace

        @rtype: Namespace

        """

        if not hasattr(self, '_entity_namespaces'):

            self._cache_entity_namespaces()

        if entity_type in self._entity_namespaces:

            return self._entity_namespaces[entity_type]

        raise EntityTypeUnknownException(

            '{0!r} does not support entity type "{1}"'

>           .format(self, entity_type))

E       EntityTypeUnknownException: DataSite("wikidata", "wikidata") does not support entity type "item"

pywikibot/site.py:7657: EntityTypeUnknownException