@PAWS:/srv/paws/pwb$ python pwb.py redirect double -ns:0 -fullscan
.
Execution time: 0 seconds
Script terminated by exception:
ERROR: 'str' object has no attribute 'namespace' (AttributeError)
Traceback (most recent call last):
File "/srv/paws/pwb/pwb.py", line 39, in <module>
sys.exit(main())
File "/srv/paws/pwb/pwb.py", line 35, in main
runpy.run_path(str(path), run_name='__main__')
File "/usr/lib/python3.10/runpy.py", line 289, in run_path
return _run_module_code(code, init_globals, run_name,
File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 516, in <module>
main()
File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 500, in main
if not execute():
File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 487, in execute
run_python_file(filename, script_args, module)
File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 147, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File "/srv/paws/pwb/scripts/redirect.py", line 742, in <module>
main()
File "/srv/paws/pwb/scripts/redirect.py", line 738, in main
bot.run()
File "/srv/paws/pwb/pywikibot/bot.py", line 1686, in run
for item in self.generator:
File "/srv/paws/pwb/pywikibot/pagegenerators/_filters.py", line 88, in <genexpr>
return (page for page in generator if page.namespace() in namespaces)
AttributeError: 'str' object has no attribute 'namespace'
CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>I think that it's effect of the output type in line 295: (the union)
def retrieve_broken_redirects(self) -> Generator[
Union[str, pywikibot.Page], None, None]:and similarly in line 319 (for the double redirects)