Hi all,

on my first steps with Python and Pywikibot, i encounter the following strange error message:

2024-05-31 16:23:19        __init__.py,  373 in             _flush: VERBOSE  Dropped throttle(s).
2024-05-31 16:23:19            http.py,  119 in              flush: VERBOSE  Closing network session.
2024-05-31 16:23:19            http.py,  123 in              flush: VERBOSE  Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\florian\AppData\Roaming\Python\Python312\Scripts\pwb.exe\__main__.py", line 7, in <module>
    sys.exit(run())
             ^^^^^
  File "C:\Users\florian\AppData\Roaming\Python\Python312\site-packages\pywikibot\scripts\wrapper.py", line 516, in run
    if not execute():
           ^^^^^^^^^
  File "C:\Users\florian\AppData\Roaming\Python\Python312\site-packages\pywikibot\scripts\wrapper.py", line 492, in execute
    run_python_file(filename, script_args, module)
  File "C:\Users\florian\AppData\Roaming\Python\Python312\site-packages\pywikibot\scripts\wrapper.py", line 149, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File ".\HandleCommonsOnOSMBot.py", line 192, in <module>
    main()
  File ".\HandleCommonsOnOSMBot.py", line 188, in main
    HandleCommonsOnOSMBot(generator=gen_factory.getCombinedGenerator(), **options).run()
  File "C:\Users\florian\AppData\Roaming\Python\Python312\site-packages\pywikibot\bot.py", line 1470, in run
    self.generator = (item for item in self.generator)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-05-31 16:23:19            http.py,  132 in              flush: CRITICAL Exiting due to uncaught exception TypeError: 'NoneType' object is not iterable
2024-05-31 16:23:19            http.py,  137 in              flush: VERBOSE  Network session closed.

This error encounters when my script is finished and pywikibot closing the network session. For the complete source code, please see

https://github.com/tohuuuuu/HandleCommonsOnOSMBot/blob/main/HandleCommonsOnOSMBot.py

I took the part starting with "def main(*args: str) -> None:" from https://doc.wikimedia.org/pywikibot/stable/library_usage.html - maybe this isn't the correct way to use it? Since the bot code works fine, it looks like a minor problem, but i'm curious if i did something wrong.

Cheers

Florian