Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python PyTables ptrepack cmd不接受绝对路径_Python_Cmd_Hdf5_Pytables - Fatal编程技术网

Python PyTables ptrepack cmd不接受绝对路径

Python PyTables ptrepack cmd不接受绝对路径,python,cmd,hdf5,pytables,Python,Cmd,Hdf5,Pytables,相对路径: 产生正确的结果 绝对路径: 给出以下错误 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\s

相对路径:

产生正确的结果

绝对路径:

给出以下错误

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解释为驱动器号。

github上有一个问题 我也遇到了这个问题,我使用了变通方法-将:添加到路径的末尾,例如: C:\Users>ptrepack C:\Users\JRC\git\metaTest.h5:C:\Users\JRC\git\xxcmdTest.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