<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ydk.errors.YModelError Validation error for date-time field in Tools</title>
    <link>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-validation-error-for-date-time-field/m-p/4194737#M1731</link>
    <description>&lt;P&gt;I am not sure, but most likely this is a bug in the &lt;EM&gt;Libyang&lt;/EM&gt; code, where the pattern string is translated to C-like regular expression. I would open an issue on ydk-gen &lt;A href="https://github.com/CiscoDevNet/ydk-gen/issues" target="_self"&gt;GitHub&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;As a workaround I suggest you to disable data validation on this particular entity. You can find corresponding examples in YDK &lt;A href="http://ydk.cisco.com/py/docs/guides/validation.html" target="_self"&gt;documentation&lt;/A&gt;&amp;nbsp;online.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Dec 2020 19:32:41 GMT</pubDate>
    <dc:creator>yangorelik</dc:creator>
    <dc:date>2020-12-07T19:32:41Z</dc:date>
    <item>
      <title>ydk.errors.YModelError Validation error for date-time field</title>
      <link>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-validation-error-for-date-time-field/m-p/4194288#M1730</link>
      <description>&lt;P&gt;Seeing below YModel error while retrieving the components. (ydk==0.8.5)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; components = crud.read(provider, openconfig_platform.Components())
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "/var/pyats/lib/python3.6/site-packages/ydk/services/crud_service.py", line 61, in read
    return _crud_read(provider, read_filter, False, self._crud.read)
  File "/var/pyats/lib/python3.6/site-packages/ydk/services/crud_service.py", line 89, in _crud_read
    read_top_entity = crud_call(provider, top_filters)
  File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/var/pyats/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
    _raise(_exc)
  File "/var/pyats/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 54, in _raise
    exec("raise exc from None")
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
ydk.errors.YModelError:  Value "2019-08-05T00:00:00Z+00:00" does not satisfy the constraint "^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$" (range, length, or pattern). Path: /openconfig-platform:components/component[name='0/2-Optics0/2/0/0']/openconfig-platform-transceiver:transceiver/state/date-code
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Though the value is complaint to the pattern&lt;/P&gt;
&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; dt = "2019-08-05T00:00:00Z+00:00"
&amp;gt;&amp;gt;&amp;gt; re.match("^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$", dt)
&amp;lt;re.Match object; span=(0, 26), match='2019-08-05T00:00:00Z+00:00'&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Dec 2020 03:52:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-validation-error-for-date-time-field/m-p/4194288#M1730</guid>
      <dc:creator>csrm7</dc:creator>
      <dc:date>2020-12-07T03:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: ydk.errors.YModelError Validation error for date-time field</title>
      <link>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-validation-error-for-date-time-field/m-p/4194737#M1731</link>
      <description>&lt;P&gt;I am not sure, but most likely this is a bug in the &lt;EM&gt;Libyang&lt;/EM&gt; code, where the pattern string is translated to C-like regular expression. I would open an issue on ydk-gen &lt;A href="https://github.com/CiscoDevNet/ydk-gen/issues" target="_self"&gt;GitHub&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;As a workaround I suggest you to disable data validation on this particular entity. You can find corresponding examples in YDK &lt;A href="http://ydk.cisco.com/py/docs/guides/validation.html" target="_self"&gt;documentation&lt;/A&gt;&amp;nbsp;online.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 19:32:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-validation-error-for-date-time-field/m-p/4194737#M1731</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-12-07T19:32:41Z</dc:date>
    </item>
  </channel>
</rss>

