elif right is not None and not self.has_right(right): raise UserRightsError('User "{}" does not have required ' 'user right "{}"' > .format(self.user(), right)) E pywikibot.exceptions.UserRightsError: User "Pywikibot-oauth" does not have required user right "upload"
Possibly the user is not logged in.