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

Indexing TAR archive on tape. #6

Open
lawndartdeath opened this issue Jul 13, 2017 · 1 comment
Open

Indexing TAR archive on tape. #6

lawndartdeath opened this issue Jul 13, 2017 · 1 comment

Comments

@lawndartdeath
Copy link

lawndartdeath commented Jul 13, 2017

Hi,
I tried to use your script to index the contents of a tar archive on a magnetic tape with the following command.

sudo ./tarindexer.py -i /dev/st0 tape.index

Which gives me this error.

One dot stands for 1000 indexed files. Traceback (most recent call last): File "./tarindexer.py", line 123, in <module> main() File "./tarindexer.py", line 118, in main indextar(dbtarfile,indexfile) File "./tarindexer.py", line 71, in indextar if(currentseek/filesize>lastpercent): ZeroDivisionError: division by zero

I'm guessing this just isn't supported. Any ideas? Thanks!

@devsnd
Copy link
Owner

devsnd commented Jul 25, 2017

Hey Joseph,

Thanks for your report! I never tried indexing a real tape using the program, but it might work indeed. It seems the tape device reports its own size as 0, which makes the program crash.

You could try to comment out these lines: https://github.com/devsnd/tarindexer/blob/master/tarindexer.py#L71-L80 (by putting a # in front of each line)

The program would then no longer report its progress, but should not crash anymore.

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

2 participants