Skip to content

Date problem #122

Description

@eduardacenteno

Hey,
I recently installed odmltables, and I was just running a quick test. I created a template.xls using the GUI and tried to convert it to odml (without changing anything). However, I keep on getting this issue:

An error occurred. This is the full error report:

Traceback (most recent call last):
File "C:\Users\eduar\Desktop\python\Bordeaux\Elephant_Course\python-odmltables\odmltables\gui\converterpages.py", line 1064, in handlebuttonbrowse
convert(self.settings)
File "C:\Users\eduar\Desktop\python\Bordeaux\Elephant_Course\python-odmltables\odmltables\gui\converterpages.py", line 1299, in convert
table.write2odml(settings.get_object('outputfilename'))
File "C:\Users\eduar\Desktop\python\Bordeaux\Elephant_Course\python-odmltables\odmltables\odml_table.py", line 830, in write2odml
doc = self.convert2odml()
File "C:\Users\eduar\Desktop\python\Bordeaux\Elephant_Course\python-odmltables\odmltables\odml_table.py", line 792, in convert2odml
setattr(doc, doc_attr_name, doc_attr_value)
File "C:\Users\eduar\anaconda3\envs\metadataenv\lib\site-packages\odml-1.5.1-py3.9.egg\odml\doc.py", line 118, in date
new_value = dtypes.date_set(new_value)
File "C:\Users\eduar\anaconda3\envs\metadataenv\lib\site-packages\odml-1.5.1-py3.9.egg\odml\dtypes.py", line 258, in date_get
return dt.datetime.strptime(string, FORMAT_DATE).date()
TypeError: strptime() argument 1 must be str, not float

It goes away if I remove the date of creation of the xls (first row).
I tried several things, changing the cell format, the way it was written, but then complains about not following the %Y-%m-%d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions