[ECODP-dev] ODP-248

Bert Van Nuffelen bert.van.nuffelen at tenforce.com
Mon Sep 16 11:38:13 UTC 2013


Hi John,

indeed the command is the paster command which uses the json as you
mentioned before. We have a transformation script that turns the RDF into
the desired json.

so the error message would mean there is a duplicate in the json:

 {
        "term" : { "type": "uri", "value": "
http://publications.europa.eu/resource/authority/corporate-body/WTO" },
        "label" : { "type": "literal", "value": "Organizaci\u00F3n Mundial
del Comercio" } ,
      "language" : { "type": "literal" , "value" : "es" }
      },

Can you be more precise, on the above example what would be the duplicate?
So that we can provide a correct search for the problem case?

kind regards,

Bert





2013/9/16 John Glover <john.glover at okfn.org>

> Hi Dimitrios,
>
> Thanks. That is an RDF file, where as our paster command reads from a JSON
> file (see [1] for example), so I assume that this is not using our paster
> command. So, the problem must be resolved by whoever is making the API
> request. Multiple publishers (also called 'groups' in CKAN internally)
> cannot have the same name, that is why validation is failing in this
> instance.
>
> [1]
> https://raw.github.com/okfn/ckanext-ecportal/master/data/po-corporate-bodies.json
>
> Regards,
> John
>
>
> On 16 September 2013 12:57, Dimitrios Mexis <dimitrios.mexis at tenforce.com>wrote:
>
>> Hello John,
>>
>> You can find this under:
>>
>> http://publications.europa.eu/mdr/resource/authority/corporate-body/skos/corporatebodies-skos.rdf
>>
>> It is the same as PO has used.
>>
>> Regards
>> Dimitrios
>>
>>
>> On Mon, Sep 16, 2013 at 12:54 PM, John Glover <john.glover at okfn.org>wrote:
>>
>>> Hi Bert,
>>>
>>> The error message means that you are trying to create a new publisher
>>> (synonym for group) with the same name as an existing publisher name, and
>>> so validation is failing.
>>>
>>> Is this using our update-publishers paster command? If this is a
>>> publisher that should be updated instead of created, then this sounds like
>>> a bug. If so, can you provide me with the publishers list that you are
>>> using for this so that I can replicate this and resolve it?
>>>
>>> Thanks,
>>> John
>>>
>>>
>>>
>>>
>>> On 16 September 2013 12:10, Bert Van Nuffelen <
>>> bert.van.nuffelen at tenforce.com> wrote:
>>>
>>>> Hi John,
>>>>
>>>> can you provide feedback on the error message occuring while uploading
>>>> a new publisher list.
>>>> Also it would be good, if the error message is more precise.
>>>>
>>>> Traceback (most recent call last):
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/bin/paster", line 8,
>>>> in <module>
>>>>     load_entry_point('PasteScript==1.7.3', 'console_scripts',
>>>> 'paster')()
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>> line 84, in run
>>>>     invoke(command, command_name, options, args[1:])
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>> line 123, in invoke
>>>>     exit_code = runner.run(args)
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>> line 218, in run
>>>>     result = self.command()
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/src/ckanext-ecportal/ckanext/ecportal/commands.py",
>>>> line 115, in command
>>>>     self.update_publishers()
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/src/ckanext-ecportal/ckanext/ecportal/commands.py",
>>>> line 602, in update_publishers
>>>>     self._add_publishers(new_publishers)
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/src/ckanext-ecportal/ckanext/ecportal/commands.py",
>>>> line 408, in _add_publishers
>>>>     logic.get_action('group_create')(context, group)
>>>>   File
>>>> "/applications/ecodp/users/ecodp/ckan/lib/ecodp/pyenv/src/ckan/ckan/logic/action/create.py",
>>>> line 483, in group_create
>>>>     raise ValidationError(errors, error_summary(errors))
>>>> ckan.logic.ValidationError: {'Name': 'Group name already exists in
>>>> database'}
>>>>
>>>> more context see:
>>>>
>>>> https://webgate.ec.europa.eu/publications/jira/browse/ODP-248
>>>>
>>>> kind regards,
>>>>
>>>> Bert
>>>> --
>>>> Bert Van Nuffelen
>>>>
>>>> Semantic Technologies Software Architect at TenForce
>>>> www.tenforce.be
>>>>
>>>> Bert.Van.Nuffelen at tenforce.com
>>>> Office: +32 (0)16 31 48 60
>>>> Mobile:+32 479 06 24 26
>>>> skype: bert.van.nuffelen
>>>>
>>>> _______________________________________________
>>>> Ecodp-dev mailing list
>>>> Ecodp-dev at lists.okfn.org
>>>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Ecodp-dev mailing list
>>> Ecodp-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>>
>>>
>>
>> _______________________________________________
>> Ecodp-dev mailing list
>> Ecodp-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>
>>
>
> _______________________________________________
> Ecodp-dev mailing list
> Ecodp-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>
>


-- 
Bert Van Nuffelen

Semantic Technologies Software Architect at TenForce
www.tenforce.be

Bert.Van.Nuffelen at tenforce.com
Office: +32 (0)16 31 48 60
Mobile:+32 479 06 24 26
skype: bert.van.nuffelen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130916/241ba298/attachment.html>


More information about the ecodp-dev mailing list