Opened 5 years ago
Closed 5 years ago
#3785 closed defect (fixed)
Registration: time data does not match format
Reported by: | Tom Goddard | Owned by: | Greg Couch |
---|---|---|---|
Priority: | moderate | Milestone: | 1.2 |
Component: | Core | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following error at startup in the registration code is from ticket #3778 from David Herreros.
The bug is that the preregistration file before July 16, 2020 contained dates formatted in the user's locale. Greg Couch changed that to format them in English locale.
https://github.com/RBVI/ChimeraX/commit/19b63e6791a9be894ef56276c18496d63c0b7fa4
So some users will now have preregistration files that have dates in both formats. This bug report comes from a user in Spain. The registration parsing code now only handles the English locale dates in the preregistration file and raises an error on startup with the Spanish locale dates. I guess the code will now have to try both date formats.
The following bug report has been submitted:
Platform: Linux-5.4.0-48-generic-x86_64-with-debian-buster-sid
ChimeraX Version: 1.1 (2020-09-09 22:22:27 UTC)
Description
Openning .seg file returns the error: "ValueError: Attempted to add model mask.seg #2 to scene twice"
Log:
Startup Errors
---
error | Bundle 'ChimeraX-Registration' custom initialization failed
warning | Traceback (most recent call last):
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 266, in _strptime
month = _months.index(month_name)
ValueError: tuple.index(x): x not in tuple
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/core/toolshed/info.py", line 342, in initialize
api._api_caller.initialize(api, session, self)
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/core/toolshed/init.py", line 1265, in initialize
return cls._get_func(api, "initialize")(session, bi)
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/init.py", line 41, in initialize
nag(session)
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 38, in nag
_check_usage(session)
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 192, in _check_usage
usage = _get_usage()
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 228, in _get_usage
usagedates.append(_strptime(value))
File
"/home/davidherreros/scipion3/software/em/chimerax-1.1/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 275, in _strptime
raise ValueError("time data does not match format")
ValueError: time data does not match format
UCSF ChimeraX version: 1.1 (2020-09-09)
© 2016-2020 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
Fallback to parsing using locale.