Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetimes fail to parse #11

Closed
evamaxfield opened this issue Aug 23, 2021 · 3 comments
Closed

Datetimes fail to parse #11

evamaxfield opened this issue Aug 23, 2021 · 3 comments

Comments

@evamaxfield
Copy link
Collaborator

In [4]: re = AICSImage("overview-translated.ome.tiff")
OME XML validation failed
failed validating '2016-03-11T10:23:44.925154UTC' with XsdAtomicBuiltin(name='xs:dateTime'):

Reason: attribute StartTime='2016-03-11T10:23:44.925154UTC': Invalid datetime string '2016-03-11T10:23:44.925154UTC' for <class 'elementpath.datatypes.datetime.DateTime10'>

Schema:

  <xs:simpleType xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="dateTime" id="dateTime">
    <xs:annotation>
    <xs:appinfo>
        <hfp:hasFacet name="pattern" />
        <hfp:hasFacet name="enumeration" />
        <hfp:hasFacet name="whiteSpace" />
        <hfp:hasFacet name="maxInclusive" />
        <hfp:hasFacet name="maxExclusive" />
        <hfp:hasFacet name="minInclusive" />
        <hfp:hasFacet name="minExclusive" />
        <hfp:hasProperty name="ordered" value="partial" />
        <hfp:hasProperty name="bounded" value="false" />
        <hfp:hasProperty name="cardinality" value="countably infinite" />
        <hfp:hasProperty name="numeric" value="false" />
      </xs:appinfo>
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime" />
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
      <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace" />
    </xs:restriction>
  </xs:simpleType>

Instance:

  <PlateAcquisition xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" ID="PlateAcquisition:1" StartTime="2016-03-11T10:23:44.925154UTC" />

Path: /OME/Plate/PlateAcquisition
@MatteBailey
Copy link
Contributor

Turns out this is actually a bug in ome-types (or one of the underlying libs): tlambert03/ome-types#104. We should probably close this issue and open one in AICSImageIO.

@tlambert03
Copy link

fixed in tlambert03/ome-types#106 ... just released v0.2.9 that includes the fix.

note also, I fixed the issue that required pinning to xmlschema 1.4.1, so xmlschema is now only pinned to >=1.4.1 for ome-types. just a heads up in case if this will affect what you want to do in your pins.

@MatteBailey
Copy link
Contributor

Got it, thanks @tlambert03!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants