<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I just got another&nbsp; error, no idea what triggered it but just reporting it anyway, it happened when copying another object with data from a sql server table.<br><br>line 191 <br>return memo[d]<br><br>object reference not set to object instance (sort of, Im translating it from spanish where it says "Referencia a objeto no establecida<br>como instancia de objeto")<br><br>Greetings<br><br><br><hr id="stopSpelling">From: pablodalma93@hotmail.com<br>To: michael@voidspace.org.uk; users@lists.ironpython.com<br>Date: Tue, 12 Oct 2010 12:40:13 -0300<br>Subject: Re: [IronPython] Bug in copy module (really need help with this!) :)<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


Hi Michael,<br>
<br>
yes, sorry, it's line 102. I have added a couple of lines to "fix" the 
problem with the module copy not copying System.DBNull types before, it 
looked like they worked with that problem. (and I erased the 
commentaries of the module) But this seems to be another problem.<br>
<br>
I compared both files with Diffuse, the only lines I've added before are<br>
<br>
import clr<br>
clr.AddReference('System')<br>
import System <br>
<br>
(at the begining) <br>
<br>
and<br>
<i><br>
</i>&nbsp;if args[0] is System.DBNull:<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; y =&nbsp; System.DBNull<br>
&nbsp;else:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y = callable(*args)<br>
<br>
in line 323 of the original file<br>
<br>
<br>
P.S: this is old but I've read your article on dynamic scope for Python 
to do something similar to Ruby code blocks, that was quite cool for me :)<br><br><hr id="ecxstopSpelling">Date: Tue, 12 Oct 2010 15:43:45 +0100<br>From: michael@voidspace.org.uk<br>To: users@lists.ironpython.com<br>CC: pablodalma93@hotmail.com<br>Subject: Re: [IronPython] Bug in copy module (really need help with this!) :)<br><br>

  


    
  
  
    On 12/10/2010 15:29, Pablo Dalmazzo wrote:
    <blockquote cite="mid:SNT104-W12DEBAB1E617EE3652F64BD0540@phx.gbl">
      <style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
      <span class="ecxApple-style-span" style="font-family: Tahoma,Verdana,Arial,sans-serif; color: rgb(42, 42, 42);">Hello
        guys,
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">we've found a bug in the copy
          module, but the real problem is we cant reproduce it.&nbsp;</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">Sometimes when we try to
          deepcopy an object of a custom object relation mapping type,
          we get this error</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">"name types is not defined"</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">Line 55: &nbsp;</div>
        <div style="line-height: 17px;">for t in
          (type(None),int,long,float,bool,str,tuple),
          frozenset,type,xrange,types.ClassType,types.BuiltinFunctionType,
          type(Ellipsis),</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
      </span></blockquote>
    In my version of Python 2.6 this is line 102 of the copy module.
    Line 51 is "import types", so a "name types is not defined" error is
    most perplexing. Is it possible that you are using a custom version
    of the copy module?<br>
    <br>
    All the best,<br>
    <br>
    Michael<br>
    <br>
    <br>
    <blockquote cite="mid:SNT104-W12DEBAB1E617EE3652F64BD0540@phx.gbl"><span class="ecxApple-style-span" style="font-family: Tahoma,Verdana,Arial,sans-serif; color: rgb(42, 42, 42);">
        <div style="line-height: 17px;">the other problem is in
          production server, where this error uses to happen
          sporadically, most times we dont get this message but an error
          message of the most outer module which calls the&nbsp;copy module,
          which is a generic message which tells us nothing&nbsp;</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">I know this is very little
          information to find a bug but, do you know of any bugs related
          to the module copy (aside it didnt copy System.DBnull which I
          believe it's not the one for this case)</div>
        <div style="line-height: 17px;"><br style="line-height: 17px;">
        </div>
        <div style="line-height: 17px;">Greetings, Pablo Dalmazzo</div>
      </span>
      <pre><fieldset class="ecxmimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="ecxmoz-signature">-- 

<a class="ecxmoz-txt-link-freetext" href="http://www.voidspace.org.uk/" target="_blank">http://www.voidspace.org.uk/</a>

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.
</pre>                                               
<br>_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com                                               </body>
</html>