Moved from GitHub pydgraph/76
Posted by jvanulde:
I am trying to add some sample data to a Dgraph instance. Here is my code thus far:
p = {}
record = { some JSON document }
p['title@en'] = record['title_translated']['en']
p['title@fr'] = "<" + str(record['title_translated']['fr']) + ">"
p['date_published'] = record['date_published']
assigned = txn.mutate(set_obj=p)
txn.commit()
I get the following error:
Error: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Attr: [title] should have @lang directive in schema to mutate edge: [entity:1903 attr:"title" value:"Versatile Soil Moisture Budget" value_type:STRING lang:"en" ]"
I have checked the lang checkbox in the schema configuration for the title predicate. Any idea on how I can get this to work?