When I click on View in browser button in the GUI interface of scripts/imagecopy.py, it doesn't open the link on the browser, however it logs No such file or directory in the terminal.
(pywikibot-core) refeed@rhTeK:~/W/core:add_option_delete_image_imagecopy$ python pwb.py imagecopy.py -newimages:10 Retrieving 4 pages from wikipedia:test. //test.wikipedia.org/w/index.php?title=File%3AMona_Lisa_one_two_one_two_this_is_just_a_test.jpg&oldid=339081 gio: file:////test.wikipedia.org/w/index.php%3Ftitle=File%253AMona_Lisa_one_two_one_two_this_is_just_a_test.jpg&oldid=339081: Error when getting information for file “//test.wikipedia.org/w/index.php?title=File%3AMona_Lisa_one_two_one_two_this_is_just_a_test.jpg&oldid=339081”: No such file or directory
self.url doesn't contain any protocol name there like http or https, just //test.wikipedia.org/w/in..., and I think webbrowser.open() reads it as file: instead of http protocol, that's the problem.
Here is my pwb version:
(pywikibot-core) refeed@rhTeK:~/W/core:master$ python pwb.py version Pywikibot: [ssh] pywikibot-core.git (5d8f6e8, g8805, 2017/12/13, 08:56:17, ok) Release version: 3.0-dev requests version: 2.18.4 cacerts: /home/rafid/.venvs/pywikibot-core/lib/python3.6/site-packages/certifi/cacert.pem certificate test: ok Python: 3.6.3 (default, Oct 9 2017, 12:11:29) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] PYWIKIBOT2_DIR: Not set PYWIKIBOT2_DIR_PWB: PYWIKIBOT2_NO_USER_CONFIG: Not set Config base dir: /home/rafid/WikimediaGerrit/core Usernames for family "commons": commons: Rafidaslam (no sysop configured) Usernames for family "wikipedia": id: Rafidaslam (no sysop configured)