It looks as if the problem is related to lack of an annal:uri field. I was trying to copy a view record without a URI. This line should specify a default value:
File "/home/annalist/anenv/lib/python2.7/site-packages/annalist_root/annalist/views/entityedit.py", line 307, in form_render
entityvals.pop(ANNAL.CURIE.uri)
KeyError: 'annal:uri'
Do a code-wide search for dictionary .pop functions and check they specify default values where needed (at one point, I thought the default just defaulted to None).
From the server log:
INFO 2014-11-21 16:59:16,383 views.entityedit.get: coll_id test, type_id _view, entity_id Data_view, view_id View_view, action copy
ERROR 2014-11-21 16:59:16,464 Internal Server Error: /annalist/c/test/v/View_view/_view/Data_view/!copy
Traceback (most recent call last):
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
return handler(request, *args, **kwargs)
File "/home/annalist/anenv/lib/python2.7/site-packages/annalist_root/annalist/views/entityedit.py", line 127, in get
return self.form_render(viewinfo, entity, add_field, continuation_url)
File "/home/annalist/anenv/lib/python2.7/site-packages/annalist_root/annalist/views/entityedit.py", line 307, in form_render
entityvals.pop(ANNAL.CURIE.uri)
KeyError: 'annal:uri'
ERROR 2014-11-21 16:59:16,464 Internal Server Error: /annalist/c/test/v/View_view/_view/Data_view/!copy
Traceback (most recent call last):
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/annalist/anenv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
return handler(request, *args, **kwargs)
File "/home/annalist/anenv/lib/python2.7/site-packages/annalist_root/annalist/views/entityedit.py", line 127, in get
return self.form_render(viewinfo, entity, add_field, continuation_url)
File "/home/annalist/anenv/lib/python2.7/site-packages/annalist_root/annalist/views/entityedit.py", line 307, in form_render
entityvals.pop(ANNAL.CURIE.uri)
KeyError: 'annal:uri'
It looks as if the problem is related to lack of an
annal:uri
field. I was trying to copy a view record without a URI. This line should specify a default value:Do a code-wide search for dictionary
.pop
functions and check they specify default values where needed (at one point, I thought the default just defaulted toNone
).From the server log: