Page MenuHomePhabricator does not run (throws an error) on Python 2
Closed, DuplicatePublic


Steps to reproduce

$ python2 imageharvest -simulate
WARNING: /home/pavel/pywikibot/pywikibot/ FutureWarning: 
Python 2.7.16 will be dropped in 2020.
It is recommended to use Python 3.5 or above.
See T213287 for further information.


From what URL should I get the images?
What text should be added at the end of the description of each image from this url? 
Traceback (most recent call last):
  File "", line 250, in <module>
    if not main():
  File "", line 245, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "", line 95, in run_python_file
  File "./scripts/", line 161, in <module>
  File "./scripts/", line 157, in main
    run_bot(url, image_url, desc)
  File "./scripts/", line 111, in run_bot
    ilinks = get_imagelinks(url)
  File "./scripts/", line 55, in get_imagelinks
    with urlopen(url) as f:
AttributeError: addinfourl instance has no attribute '__exit__'
CRITICAL: Exiting due to uncaught exception <type 'exceptions.AttributeError'>