Closed MSusik closed 9 years ago
You have a syntax error in your producer rule:
json_for_marc(), {"667__a", ""}
should be:
json_for_marc(), {"667__a": ""}
Can you please verify if it works with the fix so we can close the issue?
Thank you, it solved the problem.
Let's consider Inspire authors record configuration:
https://github.com/MSusik/inspire-next/blob/A1_authorrecords/inspire/modules/authors/recordext/fields/author.cfg
I noticed that the field
_curators_note
is not produced whenlegacy_export_as_marc
is used. The problem is that inside producer there is aniteritem
function. The functionget_producer_rules
unfortunately returnsset
for_curators_note
.I tried to find the source of the problem. It seems that it lies in
parser.py
. Inside_create_rule
I inserted:And I received:
As you can see,
_curators_note
has different type than the rest. It is propagated further and causesjson_for_marc
to fall into exception.Rules are created in
rules = parser.parseFile(field_file, parseAll=True)
, and this ispyparsing
stuff. I don't know this library, so I don't think that I can help here.