user2377038
user2377038

Reputation: 21

DSSP from Biopython throwing an error 'NameError: global name 'FileNotFoundError''

I'm trying to run DSSP through Biopython, a couple of months ago the code worked, however, I now get this erroe. Any help would be much appreciated.

>>>from Bio.PDB.PDBParser import PDBParser
>>>from Bio.PDB.DSSP import DSSP
>>>p=PDBParser(PERMISSIVE=1)
>>>st= p.get_structure('1bzq','1bzqK.pdb')
>>>model=st[0]
>>>dssp= DSSP(model,'1bzqK.pdb',dssp='dssp')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rennes/akhila/.local/lib/python2.7/site-packages/Bio/PDB/DSSP.py", line 355, in __init__
except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined

I have checked the path of dssp also by

user@home:~/Documents/FR_distances$ mkdssp
mkdssp 2.2.1 options:
-h [ --help ]         Display help message
-i [ --input ] arg    Input file
-o [ --output ] arg   Output file, use 'stdout' to output to screen
-v [ --verbose ]      Verbose output
--version             Print version
-d [ --debug ] arg    Debug level (for even more verbose output)

I have also referred to this and changed the dssp path, but still it gives me the same error.

Upvotes: 0

Views: 812

Answers (1)

rodgdor
rodgdor

Reputation: 2630

From source code:

Note that the recent DSSP executable from the DSSP-2 package was renamed from dssp to mkdssp. If using a recent DSSP release, you may need to provide the name of your DSSP executable: >>> dssp = DSSP(model, '1mot.pdb', dssp='mkdssp')

Try replacing dssp= DSSP(model,'1bzqK.pdb',dssp='dssp') by:

dssp = DSSP(model, '1bzqK.pdb', dssp='mkdssp')

Upvotes: 1

Related Questions