You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Please copy and run the above in your Python, and copy-and-paste the output)
Expected behaviour
In the PDB header there is a deposition date in xx-xxx-xx format. If this is filled out with non-english month month abbreviations (e.g. Okt for October or Ago for August), Biopython should assign the month to be '0' as it does for the xxx case
Actual behaviour
Reproduced from parse_pdb_header._format_date function:
In [3]: pdb_date = "21-Ago-23"
In [4]: month = str(all_months.index(pdb_date[3:6]))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4], line 1
----> 1 month = str(all_months.index(pdb_date[3:6]))
ValueError: 'Ago' is not in list
Proposed solution:
We should make a check in the _format_date function that the string being checked is actually in the all_months list and if not set the month to '0'.
The text was updated successfully, but these errors were encountered:
Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
(Please copy and run the above in your Python, and copy-and-paste the output)
Expected behaviour
In the PDB header there is a deposition date in
xx-xxx-xx
format. If this is filled out with non-english month month abbreviations (e.g. Okt for October or Ago for August), Biopython should assign the month to be'0'
as it does for thexxx
caseActual behaviour
Reproduced from
parse_pdb_header._format_date
function:Proposed solution:
We should make a check in the
_format_date
function that the string being checked is actually in theall_months
list and if not set the month to'0'
.The text was updated successfully, but these errors were encountered: