<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #2252: UKLP harvesters returning errors when importing due to schema changes</title>
    <link>http://localhost/ticket/2252</link>
    <description>&lt;p&gt;
See trace below.
&lt;/p&gt;
&lt;p&gt;
As in &lt;a class="closed ticket" href="http://localhost/ticket/2231" title="defect: Base harvester broken on 1.6.1 (closed: fixed)"&gt;#2231&lt;/a&gt;, the schema passed with the context is no longer used on the logic layer (in this case the one used on the DGU form is used). This can be fixed allowing a schema to be passed with the context.
&lt;/p&gt;
&lt;pre class="wiki"&gt;  File "/var/lib/ckan/std/pyenv/src/ckanext-inspire/ckanext/inspire/harvesters.py", line 139, in import_stage
    self.import_gemini_object(harvest_object.content)
  File "/var/lib/ckan/std/pyenv/src/ckanext-inspire/ckanext/inspire/harvesters.py", line 163, in import_gemini_object
    package = self.write_package_from_gemini_string(unicode_gemini_string)
  File "/var/lib/ckan/std/pyenv/src/ckanext-inspire/ckanext/inspire/harvesters.py", line 386, in write_package_from_gemin
    package = self._create_package_from_data(package_dict, package = package)
  File "/var/lib/ckan/std/pyenv/src/ckanext-inspire/ckanext/inspire/harvesters.py", line 486, in _create_package_from_dat
    package_dict = action_function(context, package_dict)
  File "/usr/lib/pymodules/python2.6/ckan/logic/action/update.py", line 169, in package_update
    data, errors = validate(data_dict, schema, context)
  File "/usr/lib/pymodules/python2.6/ckan/lib/navl/dictization_functions.py", line 216, in validate
    converted_data, errors = _validate(flattened, schema, context)
  File "/usr/lib/pymodules/python2.6/ckan/lib/navl/dictization_functions.py", line 289, in _validate
    convert(converter, key, converted_data, errors, context)
  File "/usr/lib/pymodules/python2.6/ckan/lib/navl/dictization_functions.py", line 179, in convert
    converter(key, converted_data, errors, context)
  File "/var/lib/ckan/std/pyenv/src/ckanext-dgu/ckanext/dgu/validators.py", line 81, in validate_license
    if data[('license_id',)]== '__extra__':
KeyError: ('access_constraints',)
2012-03-19 10:47:41,736 ERROR [ckanext.inspire.harvesters] Error importing Gemini document: ('access_constraints',)
&lt;/pre&gt;</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/2252</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>amercader</dc:creator>

      <pubDate>Fri, 30 Mar 2012 11:59:47 GMT</pubDate>
      <title>status, description changed; resolution set</title>
      <link>http://localhost/ticket/2252#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/2252#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/2252?action=diff&amp;amp;version=1"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
There is a new ticket for the same schema as forms issue: &lt;a class="new ticket" href="http://localhost/ticket/2268" title="enhancement: UKLP Use same schema as form for harvested records (new)"&gt;#2268&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The exception was fixed on &lt;a class="ext-link" href="https://github.com/okfn/ckanext-inspire/commit/0dff1f6"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;0dff1f6&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>amercader</dc:creator>

      <pubDate>Mon, 02 Apr 2012 13:53:56 GMT</pubDate>
      <title>status, milestone changed; resolution deleted</title>
      <link>http://localhost/ticket/2252#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/2252#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;closed&lt;/em&gt; to &lt;em&gt;reopened&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                &lt;em&gt;fixed&lt;/em&gt; deleted
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                changed from &lt;em&gt;ckan-sprint-2012-04-02&lt;/em&gt; to &lt;em&gt;current-ckan-sprint-2012-04-16&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This needs more work on ckanext-dgu and testing.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>amercader</dc:creator>

      <pubDate>Mon, 02 Apr 2012 13:54:13 GMT</pubDate>
      <title>keywords changed</title>
      <link>http://localhost/ticket/2252#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/2252#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;keywords&lt;/strong&gt;
              &lt;em&gt;[1d]&lt;/em&gt; added
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>amercader</dc:creator>

      <pubDate>Mon, 16 Apr 2012 09:11:35 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2252#comment:4</link>
      <guid isPermaLink="false">http://localhost/ticket/2252#comment:4</guid>
      <description>
        &lt;p&gt;
Fixed on 0dff1f6c2e
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>amercader</dc:creator>

      <pubDate>Mon, 16 Apr 2012 09:11:42 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/2252#comment:5</link>
      <guid isPermaLink="false">http://localhost/ticket/2252#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;reopened&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>