Command line:
python pwb.py replace -fix:HTML -lang:ar -page:"اللغة البونيقية"
Output:
Retrieving 1 pages from wikipedia:ar.
>>> اللغة البونيقية <<<
@@ -3 +3 @@
- | nativename = {{رمز لغة|xpu|{{خط|Phnx|𐤃𐤁𐤓𐤉𐤌 𐤊𐤍𐤏𐤍𐤉𐤌}}}}<br> [[نقحرة]]: دبريم كنعنيم<br> نطق:Dabarī+ | nativename = {{رمز لغة|xpu|{{خط|Phnx|𐤃𐤁𐤓𐤉𐤌 𐤊𐤍𐠍
<Unicode console stderr>.write: OSError('WriteConsoleW returned 0, n.value = 0')
0 pages read
0 pages written
0 pages skipped
Execution time: 0 seconds
Script terminated by exception:
ERROR: OSError: WriteConsoleW returned 0, n.value = 0
Traceback (most recent call last):
File "C:\Users\Mohammed\core\pwb.py", line 364, in <module>
if not main():
File "C:\Users\Mohammed\core\pwb.py", line 356, in main
run_python_file(filename,
File "C:\Users\Mohammed\core\pwb.py", line 74, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File ".\scripts\replace.py", line 1098, in <module>
main()
File ".\scripts\replace.py", line 1090, in main
bot.run()
File "C:\Users\Mohammed\core\pywikibot\bot.py", line 1495, in run
self.treat(page)
File ".\scripts\replace.py", line 714, in treat
pywikibot.showDiff(original_text, new_text, context=context)
File "C:\Users\Mohammed\core\pywikibot\__init__.py", line 1187, in showDiff
PatchManager(oldtext, newtext, context=context).print_hunks()
File "C:\Users\Mohammed\core\pywikibot\diff.py", line 319, in print_hunks
pywikibot.output('\n'.join(self._generate_diff(super_hunk)
File "C:\Users\Mohammed\core\pywikibot\logging.py", line 125, in output
logoutput(text, decoder, newline, INFO, **kwargs)
File "C:\Users\Mohammed\core\pywikibot\logging.py", line 101, in logoutput
logger.log(_level, text, extra=context, **kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1512, in log
self._log(level, msg, args, **kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1589, in _log
self.handle(record)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1599, in handle
self.callHandlers(record)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1661, in callHandlers
hdlr.handle(record)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 952, in handle
self.emit(record)
File "C:\Users\Mohammed\core\pywikibot\userinterfaces\terminal_interface_base.py", line 493, in emit
return self.UI.output(text, targetStream=self.stream)
File "C:\Users\Mohammed\core\pywikibot\userinterfaces\terminal_interface_base.py", line 237, in output
self._print(text, targetStream)
File "C:\Users\Mohammed\core\pywikibot\userinterfaces\terminal_interface_base.py", line 175, in _print
self._write(text, target_stream)
File "C:\Users\Mohammed\core\pywikibot\userinterfaces\terminal_interface_base.py", line 136, in _write
target_stream.write(text)
File "C:\Users\Mohammed\core\pywikibot\userinterfaces\win32_unicode.py", line 125, in write
raise IOError('WriteConsoleW returned %r, n.value = %r'
OSError: WriteConsoleW returned 0, n.value = 0
CRITICAL: Exiting due to uncaught exception <class 'OSError'>Output of version.py:
Pywikibot: [https] r-pywikibot-core (b2dcf1a, g14699, 2021/04/24, 17:37:12, master)
Release version: 6.1.1.dev0
requests version: 2.25.1
certificate test: ok
Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 4 2021, 13:27:16) [MSC v.1928 64 bit (AMD64)]Note:
- Bot crashes while processing ar:اللغة البونيقية, probably because it contains this text 𐤃𐤁𐤓𐤉𐤌 𐤊𐤍𐤏𐤍𐤉𐤌
- When viewing the article in my web browser (Google chrome), the text in the article is shown correctly.
Request:
- Please make the bot skip the page (and not crash) when it encounters such errors. This is to save the time needed to manually restart the bot every time it crashes. Thank you.