Page MenuHomePhabricator

CCC TypeError in notify_user
Closed, ResolvedPublic

Description

Type error relating to notify_user.

File:Rolling Stones crowd glowing cellphones 14 August 2019 Seattle.jpg
Traceback (most recent call last):
  File "notification_tests.py", line 23, in <module>
    image_corruption_utils.notify_user(site, page, "30 days", "full_scan")
  File "/home/ccc/Commons-image-corruption-detector/image_corruption_utils.py", line 119, in notify_user
    user, timestamp = getUploaderAndTimestamp(site, image)
  File "/home/ccc/Commons-image-corruption-detector/image_corruption_utils.py", line 99, in getUploaderAndTimestamp
    fp = pywikibot.FilePage(site, filename)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/tools/__init__.py", line 1744, in wrapper
    return obj(*__args, **__kw)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 2478, in __init__
    super(FilePage, self).__init__(source, title, 6)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/tools/__init__.py", line 1744, in wrapper
    return obj(*__args, **__kw)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 2327, in __init__
    super(Page, self).__init__(source, title, ns)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 200, in __init__
    self._link = Link(title, source=source, default_namespace=ns)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/tools/__init__.py", line 1744, in wrapper
    return obj(*__args, **__kw)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 6008, in __init__
    if '|' in self._text:
TypeError: argument of type 'Page' is not iterable

Revisions and Commits

Event Timeline

TheSandDoctor created this task.
TheSandDoctor created this object with visibility "Public (No Login Required)".
TheSandDoctor closed this task as Resolved by committing Restricted Diffusion Commit.Feb 3 2020, 4:08 PM
TheSandDoctor added a commit: Restricted Diffusion Commit.