Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Exception on archive (IndexError: list index out of range) #10

Open
DiogoNeves opened this issue Nov 17, 2014 · 1 comment
Open

Exception on archive (IndexError: list index out of range) #10

DiogoNeves opened this issue Nov 17, 2014 · 1 comment

Comments

@DiogoNeves
Copy link

Here's the traceback:

Traceback (most recent call last):
  File "/usr/bin/postgres_to_s3.py", line 177, in <module>
    archive(args.schedule_module)
  File "/usr/bin/postgres_to_s3.py", line 106, in __init__
    year = name_parts[-3]
IndexError: list index out of range

After looking at the code, the line that seems to create the wrong list size is 105:

# value of key.name in my execution: mdb/mdb_test_20141117_182804.tar.gz
name_parts = key.name.split('/')

I don't mind submitting a fix but I wasn't sure if this is just me not using it properly :)

@DiogoNeves
Copy link
Author

I've currently fixed it by adding an extra folder to the key, but this is a hacky solution. Let me know if you want me to work on a proper code fix :)

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

No branches or pull requests

1 participant