Normally pywikibot writes logs for all scripts.
script-bot.log
When this log have more than ~1048000 b, this file is renamed to sript-bot.1.log
But now instead of creating new file, bot have problem with writing to new file and writes in command winddow:
(for claimit.py)
--- Logging error ---
Traceback (most recent call last):
File "C:\Python38\lib\logging\handlers.py", line 70, in emit
self.doRollover()
File "I:\pwb\pywikibot\tools\_logging.py", line 57, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\Python38\lib\logging\handlers.py", line 111, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] Proces nemá přístup k souboru, neboť jej právě využívá jiný proces: 'i:\\pwb\\logs\\claimit-bot.log' -> 'i:\\pwb\\logs\\claimit-bot.1.log'
Call stack:
File "I:\pwb\pwb.py", line 362, in <module>
if __name__ == '__main__':
File "I:\pwb\pwb.py", line 354, in main
if check_modules(filename) or help_option:
File "I:\pwb\pwb.py", line 73, in run_python_file
source = f.read()
File ".\scripts\claimit.py", line 161, in <module>
main()
File ".\scripts\claimit.py", line 157, in main
bot.run()
File "I:\pwb\pywikibot\bot.py", line 1590, in run
"""Update site before calling treat."""
File "I:\pwb\pywikibot\bot.py", line 1501, in run
self._generator_completed = True
File "I:\pwb\pywikibot\bot.py", line 1780, in treat
def put_current(self, new_text, ignore_save_related_errors=None,
File "I:\pwb\pywikibot\bot.py", line 2235, in treat_page
"""
File ".\scripts\claimit.py", line 94, in treat_page_and_item
self.user_add_claim_unless_exists(
File "I:\pwb\pywikibot\bot.py", line 2106, in user_add_claim_unless_exists
if not existing.target_equals(claim.getTarget()):
File "I:\pwb\pywikibot\logging.py", line 169, in log
"""Output a critical record to the user via the userinterface."""
File "I:\pwb\pywikibot\logging.py", line 104, in logoutput
Message: 'Use -exists:p option to override this behavior'
Arguments: ()Maybe this is caused by some restriction in windows 10 after last update (2004, 19041.572), but I updated pywikibot at the same time.