Martimpassos added a comment.

  I think I kind of solved it by manually editing `user-config.py`, but now 
`item = pywikibot.ItemPage(repo, 'Q114776071')` gives
  
    AttributeError                            Traceback (most recent call last)
    Cell In [21], line 1
    ----> 1 item = pywikibot.ItemPage(repo, 'Q114776071')
    
    File /srv/paws/pwb/pywikibot/page/_wikibase.py:810, in 
ItemPage.__init__(self, site, title, ns)
        807 if not title:
        808     raise InvalidTitleError("Item's title cannot be empty")
    --> 810 super().__init__(site, title, ns=ns)
        812 assert self.id == self._link.title
    
    File /srv/paws/pwb/pywikibot/page/_wikibase.py:484, in 
WikibasePage.__init__(self, site, title, **kwargs)
        481         self._namespace = entity_type_ns
        482         kwargs['ns'] = self._namespace.id
    --> 484 BasePage.__init__(self, site, title, **kwargs)
        486 # If a title was not provided,
        487 # avoid checks which may cause an exception.
        488 if not title:
    
    File /srv/paws/pwb/pywikibot/page/_pages.py:128, in BasePage.__init__(self, 
source, title, ns)
        125     raise ValueError('Title cannot be None.')
        127 if isinstance(source, pywikibot.site.BaseSite):
    --> 128     self._link = Link(title, source=source, default_namespace=ns)
        129     self._revisions = {}
        130 elif isinstance(source, Page):
        131     # copy all of source's attributes to this object
        132     # without overwriting non-None values
    
    File /srv/paws/pwb/pywikibot/page/_links.py:303, in Link.__init__(self, 
text, source, default_namespace)
        300 self._text = self._text.strip()
        302 # Convert URL-encoded characters to unicode
    --> 303 self._text = pywikibot.tools.chars.url2string(
        304     self._text, encodings=self._source.encodings())
        306 # Clean up the name, it can come from anywhere.
        307 # Convert HTML entities to unicode
        308 t = html2unicode(self._text)
    
    AttributeError: module 'pywikibot' has no attribute 'tools'

TASK DETAIL
  https://phabricator.wikimedia.org/T321408

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Martimpassos
Cc: Aklapper, pywikibot-bugs-list, Martimpassos, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to