<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>Bonjour, j'ai rencontré une difficulté avec la 
création de document de type fichiers sur un CPS 3.4</FONT></DIV>
<DIV><FONT face=Verdana size=2>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.</FONT></DIV>
<DIV><FONT face=Verdana size=2>J'ai mis une rustine sur CPS, mais je ne trouve 
pas çà propre :</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT face="Courier New">&nbsp;&nbsp;&nbsp; def 
setAsAttribute(self, ob, field_id, value):<BR></FONT><FONT 
face="Courier New"><STRONG><FONT 
color=#ff0000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
value:<BR></FONT></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
for k in getattr(ob, field_id, 
()):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if 
k.startswith('_'):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
continue<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
try:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
delattr(ob, 
k)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
except (AttributeError, 
KeyError):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
pass<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setattr(ob, field_id, 
tuple(value.keys()))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
for k, v in 
value.items():<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if 
k.startswith('_'):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
continue<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setattr(ob, k, v)<BR></FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2>Avez vous une meilleure idée ? Existe-t-il un 
patch connu pour cette erreur ?</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>Cordialement</DIV></FONT>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV>
<TABLE cellSpacing=2 cellPadding=2 width="100%">
  <TBODY>
  <TR>
    <TD><FONT face="Courier New" size=1>AttributeError</FONT></TD></TR>
  <TR>
    <TH><FONT face="Courier New" size=1>Error Value:</FONT></TH>
    <TD><PRE><FONT size=1>'NoneType' object has no attribute 'keys'</FONT></PRE></TD></TR>
  <TR>
    <TH><FONT face="Courier New" size=1>Traceback:</FONT></TH>
    <TD><PRE><P><FONT size=1>Traceback (innermost last):
</FONT><UL>

<LI><FONT size=1>  Module ZPublisher.Publish, line 115, in publish

</FONT><LI><FONT size=1>  Module ZPublisher.mapply, line 88, in mapply

</FONT><LI><FONT size=1>  Module ZPublisher.Publish, line 41, in call_object

</FONT><LI><FONT size=1>  Module Products.CMFCore.FSPythonScript, line 108, in __call__

</FONT><LI><FONT size=1>  Module Shared.DC.Scripts.Bindings, line 311, in __call__

</FONT><LI><FONT size=1>  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec

</FONT><LI><FONT size=1>  Module Products.CMFCore.FSPythonScript, line 164, in _exec

</FONT><LI><FONT size=1>  Module None, line 26, in cpsdocument_create<BR>
<B>&lt;FSPythonScript at /cps/cpsdocument_create used for /cps/workspaces&gt;</B><BR>
<B>Line 26</B>

</FONT><LI><FONT size=1>  Module Products.CMFCore.FSPythonScript, line 108, in __call__

</FONT><LI><FONT size=1>  Module Shared.DC.Scripts.Bindings, line 311, in __call__

</FONT><LI><FONT size=1>  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec

</FONT><LI><FONT size=1>  Module Products.CMFCore.FSPythonScript, line 164, in _exec

</FONT><LI><FONT size=1>  Module None, line 23, in cpsdocument_create_do<BR>
<B>&lt;FSPythonScript at /cps/cpsdocument_create_do used for /cps/workspaces&gt;</B><BR>
<B>Line 23</B>

</FONT><LI><FONT size=1>  Module Products.CPSCore.CPSTypes, line 60, in invokeFactory

</FONT><LI><FONT size=1>  Module Products.CPSWorkflow.workflowtool, line 306, in invokeFactoryFor

</FONT><LI><FONT size=1>  Module Products.CPSWorkflow.workflowtool, line 442, in _createObject

</FONT><LI><FONT size=1>  Module Products.CPSCore.ProxyTool, line 167, in createRevision

</FONT><LI><FONT size=1>  Module Products.CPSCore.ObjectRepositoryTool, line 133, in createRevision

</FONT><LI><FONT size=1>  Module Products.CPSCore.CPSTypes, line 112, in constructContent

</FONT><LI><FONT size=1>  Module Products.CPSDocument.FlexibleTypeInformation, line 233, in _constructInstance

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.DataModel, line 334, in _commit

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.DataModel, line 360, in _commitData

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.StorageAdapter, line 146, in setData

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.StorageAdapter, line 181, in _setData

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.StorageAdapter, line 249, in _setFieldData

</FONT><LI><FONT size=1>  Module Products.CPSSchemas.BasicFields, line 740, in setAsAttribute

</FONT></LI></UL><FONT size=1>AttributeError: 'NoneType' object has no attribute 'keys'
</FONT><P></P></PRE></TD></TR></TBODY></TABLE></DIV>
<DIV>
<HR>
<FONT style="FONT-SIZE: 9px; COLOR: #00adce; FONT-FAMILY: Verdana"><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cédric 
Marfil</FONT><BR>Concepteur Réalisateur Intégrateur Confirmé<BR><B>Tél. 
direct:</B> 03.20.65.34.82<BR><B>Mail:</B> <A 
href="mailto:cedric.marfil@capgemini.com">cedric.marfil@capgemini.com</A><BR><BR><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cap</FONT><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #00adce">gemini</FONT><BR>181 
rue Jules Delcenserie<BR>59700 Marcq en Baroeul<BR></FONT></DIV></BODY></HTML>

<table><tr><td bgcolor=#ffffff><font color=#000000>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.<br>
<br>
</font></td></tr></table>