PyTables ptrepack cmd不接受绝对路径

时间:2017-05-14 01:38:05

标签: python cmd hdf5 pytables

相对路径:

C:\Users>ptrepack JRC\git\metaTest.h5 JRC\git\cmdTest.h5

产生正确的结果

绝对路径:

C:\Users>ptrepack C:\Users\JRC\git\metaTest.h5 C:\Users\JRC\git\xxcmdTest.h5

给出以下错误

Traceback (most recent call last):
  File "C:\Users\JRC\Anaconda3\Scripts\ptrepack-script.py", line 5, in <module>
    sys.exit(tables.scripts.ptrepack.main())
  File "C:\Users\JRC\Anaconda3\lib\site-packages\tables\scripts\ptrepack.py", line 508, in main
    h5srcfile = open_file(srcfile, 'r')
  File "C:\Users\JRC\Anaconda3\lib\site-packages\tables\file.py", line 318, in open_file
    return File(filename, mode, title, root_uep, filters, **kwargs)
  File "C:\Users\JRC\Anaconda3\lib\site-packages\tables\file.py", line 784, in _
_init__
    self._g_new(filename, mode, **params)
  File "tables\hdf5extension.pyx", line 370, in tables.hdf5extension.File._g_new
 (tables\hdf5extension.c:4321)
  File "C:\Users\JRC\Anaconda3\lib\site-packages\tables\utils.py", line 157, in
check_file_access
    raise IOError("``%s`` does not exist" % (filename,))


IOError: ``C`` does not exist

我做错了什么,似乎并没有将C解释为驱动器号。

1 个答案:

答案 0 :(得分:1)

github https://github.com/PyTables/PyTables/issues/616上存在问题 我也遇到了这个问题,我使用了解决方法 - 将“:”添加到路径的末尾,例如: C:\ Users&gt; ptrepack C:\ Users \ JRC \ git \ metaTest.h5:C:\ Users \ JRC \ git \ xxcmdTest.h5: