Skip to content

scanlogfiles crashed with UnicodeDecodeError #1

@philippeowagner

Description

@philippeowagner
python manage.py scanlogfiles

Scanning logfiles...Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/..../my/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/..../my/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/..../my/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/..../my/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/..../my/src/alogator/alogator/management/commands/scanlogfiles.py", line 10, in handle
    logWatcher()
  File "/..../my/src/alogator/alogator/logwatch.py", line 34, in logWatcher
    analyzeFile(logFileObj)
  File "/..../my/src/alogator/alogator/logwatch.py", line 69, in analyzeFile
    readTail(logfile, logFileObj)
  File "/..../my/src/alogator/alogator/logwatch.py", line 123, in readTail
    character = logfile.read(1)
  File "/..../my/lib/python2.7/codecs.py", line 671, in read
    return self.reader.read(size)
  File "/..../my/lib/python2.7/codecs.py", line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x99 in position 0: invalid start byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions