Vicarage added a comment.
When I ran software ticket systems, I found it best to let the problem
reporter to update the ticket before marking it closed.
My pwb.py starts
#!/usr/bin/env python
PYTHON_VERSION = sys.version_info[:3]
PY2 = (PYTHON_VERSION[0] == 2)
versions_required_message = """
Pywikibot is not available on:
{version}
This version of Pywikibot only supports Python 2.7.2+ or 3.4+.
"""
def python_is_supported():
"""Check that Python is supported."""
# Any change to this must be copied to setup.py
return PYTHON_VERSION >= (3, 4, 0) or PY2 and PYTHON_VERSION >= (2, 7, 2)
So I had no reason to try python3
python3 /home/john/bin/pywikibot/core/pwb.py imagetransfer -v File:Happy.jpeg
-tofamily:newwiki
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0]
Found 1 oldwiki:en-gb processes running, including this one.
------------------------------------------------------------
0. Found image: [[File:Happy.jpeg]]
Found 1 newwiki:en-gb processes running, including this one.
============================================================
WARNING: /home/john/bin/pywikibot/core/scripts/imagetransfer.py:143:
DeprecationWarning: pywikibot.page.FilePage.fileUrl is deprecated for 4 years
and 4 months; use get_file_url instead.
url = sourceImagePage.fileUrl().encode('utf-8')
Traceback (most recent call last):
File "/home/john/bin/pywikibot/core/pwb.py", line 257, in <module>
if not main():
File "/home/john/bin/pywikibot/core/pwb.py", line 250, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "/home/john/bin/pywikibot/core/pwb.py", line 119, in run_python_file
main_mod.__dict__)
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 336, in
<module>
main()
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 332, in
main
bot.run()
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 278, in
run
self.transferImage(imagelist[todo])
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 144, in
transferImage
pywikibot.output('URL should be: ' + url)
TypeError: must be str, not bytes
Dropped throttle(s).
<class 'TypeError'>
CRITICAL: Closing network session.
Network session closed.
python3 -V
Python 3.6.9
So you still have a 4 year old deprecation, and it fails.
TASK DETAIL
https://phabricator.wikimedia.org/T265257
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Vicarage
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH,
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89,
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs