[CPS-users-fr] CPS File Type

Cedric Marfil cedric.marfil at capgemini.com
Lun 16 Oct 12:32:12 CEST 2006


Bonjour, j'ai rencontré une difficulté avec la création de document de type fichiers sur un CPS 3.4
En sélectionnant le type fichier, puis le fichier à ajouter dans le formulaire et en validant, vous trouverez ci-dessous le Traceback que j'ai eu en retour.
J'ai mis une rustine sur CPS, mais je ne trouve pas çà propre :

    def setAsAttribute(self, ob, field_id, value):
        if value:
            for k in getattr(ob, field_id, ()):
                if k.startswith('_'):
                    continue
                try:
                    delattr(ob, k)
                except (AttributeError, KeyError):
                    pass
            setattr(ob, field_id, tuple(value.keys()))
            for k, v in value.items():
                if k.startswith('_'):
                    continue
                setattr(ob, k, v)

Avez vous une meilleure idée ? Existe-t-il un patch connu pour cette erreur ?

Cordialement

      AttributeError 
      Error Value: 'NoneType' object has no attribute 'keys' 
      Traceback: Traceback (innermost last):


a..   Module ZPublisher.Publish, line 115, in publish

b..   Module ZPublisher.mapply, line 88, in mapply

c..   Module ZPublisher.Publish, line 41, in call_object

d..   Module Products.CMFCore.FSPythonScript, line 108, in __call__

e..   Module Shared.DC.Scripts.Bindings, line 311, in __call__

f..   Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec

g..   Module Products.CMFCore.FSPythonScript, line 164, in _exec

h..   Module None, line 26, in cpsdocument_create
<FSPythonScript at /cps/cpsdocument_create used for /cps/workspaces>
Line 26

i..   Module Products.CMFCore.FSPythonScript, line 108, in __call__

j..   Module Shared.DC.Scripts.Bindings, line 311, in __call__

k..   Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec

l..   Module Products.CMFCore.FSPythonScript, line 164, in _exec

m..   Module None, line 23, in cpsdocument_create_do
<FSPythonScript at /cps/cpsdocument_create_do used for /cps/workspaces>
Line 23

n..   Module Products.CPSCore.CPSTypes, line 60, in invokeFactory

o..   Module Products.CPSWorkflow.workflowtool, line 306, in invokeFactoryFor

p..   Module Products.CPSWorkflow.workflowtool, line 442, in _createObject

q..   Module Products.CPSCore.ProxyTool, line 167, in createRevision

r..   Module Products.CPSCore.ObjectRepositoryTool, line 133, in createRevision

s..   Module Products.CPSCore.CPSTypes, line 112, in constructContent

t..   Module Products.CPSDocument.FlexibleTypeInformation, line 233, in _constructInstance

u..   Module Products.CPSSchemas.DataModel, line 334, in _commit

v..   Module Products.CPSSchemas.DataModel, line 360, in _commitData

w..   Module Products.CPSSchemas.StorageAdapter, line 146, in setData

x..   Module Products.CPSSchemas.StorageAdapter, line 181, in _setData

y..   Module Products.CPSSchemas.StorageAdapter, line 249, in _setFieldData

z..   Module Products.CPSSchemas.BasicFields, line 740, in setAsAttribute

AttributeError: 'NoneType' object has no attribute 'keys'
 


--------------------------------------------------------------------------------
Cédric Marfil
Concepteur Réalisateur Intégrateur Confirmé
Tél. direct: 03.20.65.34.82
Mail: cedric.marfil at capgemini.com

Capgemini
181 rue Jules Delcenserie
59700 Marcq en Baroeul


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.
-------------- section suivante --------------
Une pièce jointe HTML a été enlevée...
URL: http://lists.nuxeo.com/pipermail/cps-users-fr/attachments/20061016/24398d58/attachment.htm



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.