PyTables/PyTables — Issue #133: ptrepack and windows drive letters
Author: avalentino
Created: 2012-02-24 20:26:52+00:00
State: open

```
Apologies if this is a repost. The original email was sent from an
unsubscribed address and I don't believe it went through.

When I type the command:

ptrepack g:/data/bnb/1016/physiology/111206_12101.hd5: c:/test.hd5:

I get the following error:

Traceback (most recent call last):
File "C:\Python27\Scripts\ptrepack-script.py", line 10, in
sys.exit(main())
File "C:\Python27\lib\site-packages\tables\scripts\ptrepack.py", line 395,
in
main
srcfile, srcnode = src
ValueError: too many values to unpack

This appears to be due to the fact that the code assumes that : can
only be used as a separator between the file name and node path. May
I propose changing lines 390 & 391 in scripts/ptrepack.py from:

# Catch the files passed as the last arguments
src = pargs[0].split(':')
dst = pargs[1].split(':')

To:

# Catch the files passed as the last arguments
src = pargs[0].rsplit(':', 1)
dst = pargs[1].rsplit(':', 1)

This should alleviate the issue.

Brad
```

See http://sourceforge.net/mailarchive/message.php?msg_id=28885039