[Biopython-dev] [Bug 2751] PDBParser crashes on empty tempFactor fields

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Feb 6 21:38:09 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2751





------- Comment #4 from eric.talevich at gmail.com  2009-02-06 16:38 EST -------
Created an attachment (id=1216)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=1216&action=view)
Catch float() failures and substitute a default or forward the exception

The error message could be more helpful, and it would be nice to log a warning
whenever the first exception is caught and a default value is used. The
placement of try_float() may not match the coding conventions, I'm not sure.

Generalizing as:
    try_coerce(field, into=float, default=None): ...
would allow the same function to be used for coercing the integers and
re-raising the exceptions as PDBConstructionException.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list