Page MenuHomePhabricator

windows error with logging handler in pwb.py
Closed, DuplicatePublic

Description

C:\pwb\core>pwb.py vm-auto-erl-neu -cc
WARNING: Configuration variable 'account_global' is defined but unknown.
Misspelled?
WARNING: Configuration variable 'use_diskcache' is defined but unknown.
Misspelled?
WARNING: Configuration variable 'notify_unflagged_bot' is defined but unknown.
Misspelled?
Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 93, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
Logged from file bot.py, line 429
NOTE: option cosmetic_changes is False

Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 93, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
Logged from file bot.py, line 429
########## timestamp: 2015-03-20T15:19:11Z ############

It looks like coming from pwb.py:

C:\pwb\core>pwb.py
WARNING: Configuration variable 'account_global' is defined but unknown.
Misspelled?
WARNING: Configuration variable 'use_diskcache' is defined but unknown.
Misspelled?
WARNING: Configuration variable 'notify_unflagged_bot' is defined but unknown.
Misspelled?
Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 93, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
Logged from file bot.py, line 429
Wrapper script to use Pywikibot in 'directory' mode.

Run scripts using:

    python pwb.py <name_of_script> <options>

and it will use the package directory to store all user files, will fix up
search paths so the package does not need to be installed, etc.

Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 93, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
Logged from file bot.py, line 429
Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 93, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file bot.py, line 429

C:\pwb\core>

Event Timeline

Xqt raised the priority of this task from to Medium.
Xqt updated the task description. (Show Details)
Xqt added a project: Pywikibot.
Xqt subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMar 20 2015, 2:34 PM
XZise subscribed.

Oh maybe this isn't a duplicate of T91375 because here you don't get in an infinite loop.

I guess it isn't the same. Maybe the same cause.

Okay for now I'll reopen it.

Is it possible for you to repeat it? Not that I have a solution but if not it'll be hard to differentiate between T91375 because except for the infinite loop they look like the same. I'm also unsure why that is not happening here, maybe in the meantime something changed regarding handling log files so that it won't happen infinitely often. But my explanation why it happens infinitely often is because when it fails it tries to write it into the log which doesn't work.

Today I got:

C:\pwb\core>pwb.py
ImportError: No module named requests
Wrapper script to use Pywikibot in 'directory' mode.

Run scripts using:

    python pwb.py <name_of_script> <options>

and it will use the package directory to store all user files, will fix up
search paths so the package does not need to be installed, etc.

Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 98, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file bot.py, line 438
Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 78, in emit
    self.doRollover()
  File "C:\pwb\core\pywikibot\bot.py", line 98, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file bot.py, line 438

C:\pwb\core>