27 Nov 09:29
Re: Portal remote controller and CPS Image Field
Hi,
2. I have tried using pure Python code but I get the same exception:
xmlrpclib.Fault: <Fault -1: 'Unexpected Zope exception: exceptions.IndexError - list index out of range'>
1. I have tried with a CPS File field and the xmlrpc client doesn't return any exception, the object is created and the binary assigned but when I try to see the new document in the browser I get the following exception:
2. I have tried using pure Python code but I get the same exception:
xmlrpclib.Fault: <Fault -1: 'Unexpected Zope exception: exceptions.IndexError - list index out of range'>
1. I have tried with a CPS File field and the xmlrpc client doesn't return any exception, the object is created and the binary assigned but when I try to see the new document in the browser I get the following exception:
| AttributeError |
| Binary instance has no attribute 'size' |
|
Traceback (innermost last):
|
I suggest to try to simplify the problem to find where the problem is.
1. First could you please validate if creating a File field works
for you? If this works that could mean that the encoding of binary
data is not the cause of the problem.
2. Another try would be to test the creation of your document from pure
Python code as is specified in the CPSRemoteController doc:
from xmlrpclib import ServerProxy, Binary
f = open('MyImage.png', 'r')
binary = Binary(f.read())
p.createDocument('MySpecialZipFile',
{'Title': "The report from Monday meeting",
'Description': "Another boring report"},
'file_name': "MyImage.png",
'file_key': 'file_zip',
'file': binary,
},
'workspaces')
And please when having an error, could you please also send
the stacktrace from the server, as there should be one.
Cheers,
--
Marc-Aurèle DARCHE
AFUL http://www.aful.org/
Association Francophone des Utilisateurs de Logiciels Libres
French speaking Libre Software Users' Association
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
_______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel
RSS Feed