Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #10

Open
alohar opened this issue Apr 13, 2012 · 3 comments
Open

error #10

alohar opened this issue Apr 13, 2012 · 3 comments

Comments

@alohar
Copy link

alohar commented Apr 13, 2012

File "manage.py", line 14, in
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/timelog/management/commands/analyze_timelog.py", line 34, in handle
data = analyze_log_file(LOGFILE, PATTERN, reverse_paths=options.get('reverse'))
File "/usr/local/lib/python2.7/dist-packages/timelog/lib.py", line 75, in analyze_log_file
parsed = compiled_pattern.findall(line)[0]
IndexError: list index out of range

@kkumler
Copy link

kkumler commented Aug 24, 2012

Verify the logfile is being written in the expected format, something like:
2012-07-24 11:59:48,690 GET "/" (200) 1.36

@jsilva
Copy link

jsilva commented Mar 5, 2013

I get exactly the same error and the format is correct as in @kkumler comment.

@acriptis
Copy link

acriptis commented Feb 5, 2015

I've got a similar error (IndexError: list index out of range without stacktrace after "pip install").

Resolution I found for my case requires to extend the set of request types with PATCH keyword.
So finally I have:

PATTERN = r"""^([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9:]{8},[0-9]{3}) (GET|POST|PUT|DELETE|HEAD|PATCH) "(.*)" \((.*)\) (.*)"""

See original pattern here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants