WindowsError:[错误 2] 系统找不到指定的文件 [英] WindowsError:[Error 2] The system cannot find the file specified

查看:148
本文介绍了WindowsError:[错误 2] 系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个错误的问题,首先我创建了文件 compcode1,第二步我试图读取与 compcode1 从路径 path_compcode1 开始,它给了我以下错误

I am facing problem with this error, on the very first place I created the file compcode1 and on the second step I am trying to read the same file which is compcode1 from the path path_compcode1 and it gives me the following error

WindowsError: [错误 2] 系统找不到指定的文件.

WindowsError: [Error 2] The system cannot find the file specified.

# Extract Secondary Secondary Structure Elements (SSEs)    

def Secondary_Structure(self, code, flag):

    curr_dir = os.path.dirname(os.path.abspath(__file__))     # cuurent directory
    dest_dir = os.path.join(curr_dir, 'Output')

    if flag == 1:
        compcode1 = '1Complete_' + code + '.pdb'  
        path_compcode1 = os.path.join(dest_dir, compcode1)
        print path_compcode1
    else:
        compcode2 = '2Complete_' + code + '.pdb'
        path_compcode2 = os.path.join(dest_dir, compcode2)
        print path_compcode2



    self.SSE = []
    p = PDBParser()
    if flag == 1:
        s = p.get_structure('pdb1', path_compcode1)
    else:
        s = p.get_structure('pdb2', path_compcode2)


    model = s[0]
    if flag == 1:                              #### Flag 1: 1st pdb file
        d = DSSP(model, path_compcode1)
    elif flag == 2:                            #### Flag 2: 2nd pdb file                            
        d = DSSP(model, path_compcode2)
    else:
        print "Oops: Error"    

        print "dssp: Secondary Structure"

追溯:

C:\Users\..\Output\1Complete_1cwa.pdb 
Traceback (most recent call last):
  File "Main_Program.py", line 3353, in <module> 
    main()
  File "Main_Program.py", line 156, in main
    EM_obj1.Secondary_Structure(code, flag)     #### This will extract dssp
  File "C:\Users\..\Output\Module_ContMat.py", line 369, in Secondary_Structure
     d = DSSP(model, compcode1)
  File "c:\Python27\lib\site-packages\Bio\PDB\DSSP.py", line 303, in __init__
     dssp_dict, dssp_keys = dssp_dict_from_pdb_file(in_file, dssp)
  File "c:\Python27\lib\site-packages\Bio\PDB\DSSP.py", line 133, in dssp_dict_from_pdb_file
     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "c:\Python27\lib\subprocess.py", line 711, in __init__
     errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 959, in _execute_child
     startupinfo) 
WindowsError: [Error 2] The system cannot find the file specified

推荐答案

不是你的文件没有被找到;它是一些名为 dssp 的可执行程序,它正在启动以处理您的文件.要么它不在您的 $PATH 上,要么根本没有安装 - 我对您使用的这个库一点也不熟悉,所以我不知道这里是否需要额外的安装步骤.

It's not your file that's not being found; it's some executable program called dssp that is being launched to process your file. Either it's not on your $PATH, or it's simply not installed at all - I am not at all familiar with this library you're using, so I have no idea if there's an additional installation step needed here.

如果你有这个程序,那么编辑 $PATH 的替代方法是向 DSSP() 构造函数添加一个 dssp= 参数,指定此程序的完整路径名.

If you do have the program, it appears than an alternative to editing your $PATH would be to add a dssp= parameter to the DSSP() constructor, specifying the full pathname to this program.

这篇关于WindowsError:[错误 2] 系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆