when running
py pwb.py listpages.py -cat:category > out.txt
I get
<Unicode redirected stdout>.write: TypeError('write() argument must be str, not bytes',) Traceback (most recent call last): File "pwb.py", line 255, in <module> if not main(): File "pwb.py", line 249, in main run_python_file(filename, [filename] + args, argvu, file_package) File "pwb.py", line 121, in run_python_file main_mod.__dict__) File ".\scripts\listpages.py", line 282, in <module> main() File ".\scripts\listpages.py", line 260, in main pywikibot.stdout(output_list[-1]) File "C:\Users\User\Core\pywikibot\logging.py", line 146, in stdout logoutput(text, decoder, newline, STDOUT, **kwargs) File "C:\Users\User\Core\pywikibot\logging.py", line 107, in logoutput logger.log(_level, text, extra=context, **kwargs) File "C:\Python3\lib\logging\__init__.py", line 1345, in log self._log(level, msg, args, **kwargs) File "C:\Python3\lib\logging\__init__.py", line 1415, in _log self.handle(record) File "C:\Python3\lib\logging\__init__.py", line 1425, in handle self.callHandlers(record) File "C:\Python3\lib\logging\__init__.py", line 1487, in callHandlers hdlr.handle(record) File "C:\Python3\lib\logging\__init__.py", line 855, in handle self.emit(record) File "C:\Users\User\Core\pywikibot\userinterfaces\terminal_interface_base.py", line 526, in emit return self.UI.output(text, targetStream=self.stream) File "C:\Users\User\Core\pywikibot\userinterfaces\terminal_interface_base.py", line 245, in output self._print(text, targetStream) File "C:\Users\User\Core\pywikibot\userinterfaces\terminal_interface_base.py", line 184, in _print self._write(text, target_stream) File "C:\Users\User\Core\pywikibot\userinterfaces\terminal_interface_base.py", line 146, in _write target_stream.write(text) File "C:\Users\User\Core\pywikibot\userinterfaces\win32_unicode.py", line 126, in write self._stream.write(text) TypeError: write() argument must be str, not bytes CRITICAL: Closing network session.
Running on:
Pywikibot: [https] r-pywikibot-core.git (c3dc772, g7491, 2016/09/15, 08:55:43, n/a) Release version: 3.0-dev requests version: 2.11.1 cacerts: C:\Python3\lib\site-packages\requests\cacert.pem certificate test: ok Python: 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]