Thread: [cx-oracle-users] CLOBVar
Brought to you by:
atuining
From: Harri P. <har...@tr...> - 2004-11-18 13:18:03
|
Hi again, I'm dealing with some legacy code that used cx_Oracle 3.1. After testing with cx_Oracle 4.1-beta1, some part of the code calls pickle, and throws: pickle.PicklingError: Can't pickle <type 'CLOBVar'>: it's not found as __builtin__.CLOBVar I'm not yet sure what is the object in question, and does it make any sense to try to pickle a CLOBVar. But as this looks like to be 'regression' from 3.1, I thought I'd document it here on this list, just in case someone else runs to the same problem. -Harri This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code. |
From: Anthony T. <an...@co...> - 2004-11-18 14:58:52
|
Can you give me some code that demonstrates the problem? 4.1 beta 1 deliberately adds support for pickling of LOB variables. Up until that release, you could not pickle LOB values -- you had to explicitly pickle str(lobValue) or something similiar. I'd be interested in tracking down this problem, though, since I'd like to release cx_Oracle 4.1 at some point and I'd hate to have to immediately release a patch for it! :-) Harri Pasanen wrote: > Hi again, > > I'm dealing with some legacy code that used cx_Oracle 3.1. > > After testing with cx_Oracle 4.1-beta1, some part of the code calls > pickle, and throws: > > pickle.PicklingError: Can't pickle <type 'CLOBVar'>: it's not found as > __builtin__.CLOBVar > > I'm not yet sure what is the object in question, and does it make any > sense to try to pickle a CLOBVar. > > But as this looks like to be 'regression' from 3.1, I thought I'd > document it here on this list, just in case someone else runs to the > same problem. > > -Harri > > > This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |
From: Harri P. <har...@tr...> - 2004-11-18 15:33:41
|
On Thursday 18 November 2004 15:58, Anthony Tuininga wrote: > Can you give me some code that demonstrates the problem? 4.1 beta 1 > deliberately adds support for pickling of LOB variables. Up until > that release, you could not pickle LOB values -- you had to > explicitly pickle str(lobValue) or something similiar. I'd be > interested in tracking down this problem, though, since I'd like to > release cx_Oracle 4.1 at some point and I'd hate to have to > immediately release a patch for it! :-) I just spent some time hunting it down: It happened when pickling 'cursor.description', when the result set had a CLOB column. It may well be that 3.1 version never hit CLOB type column before, and I had code to look out for other types of columns. To reproduce, run: import cx_Oracle, cPickle cPickle.dumps(cx_Oracle.CLOB) But as cPickle.dumps(cx_Oracle.NUMBER) fails as well, I suppose it is not meant to work? -Harri This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code. |
From: Anthony T. <an...@co...> - 2004-11-18 15:59:34
|
Ah, that points the problem out quite nicely. Thanks. I have just checked in changes to the type objects to name them appropriately. They now pickle and unpickle properly. They should have been named that way to begin with but when I first started working on cx_Oracle I didn't understand all of those things. :-) Harri Pasanen wrote: > On Thursday 18 November 2004 15:58, Anthony Tuininga wrote: > >>Can you give me some code that demonstrates the problem? 4.1 beta 1 >>deliberately adds support for pickling of LOB variables. Up until >>that release, you could not pickle LOB values -- you had to >>explicitly pickle str(lobValue) or something similiar. I'd be >>interested in tracking down this problem, though, since I'd like to >>release cx_Oracle 4.1 at some point and I'd hate to have to >>immediately release a patch for it! :-) > > > I just spent some time hunting it down: > > It happened when pickling 'cursor.description', when the result set > had a CLOB column. It may well be that 3.1 version never hit CLOB > type column before, and I had code to look out for other types of > columns. > > To reproduce, run: > > import cx_Oracle, cPickle > cPickle.dumps(cx_Oracle.CLOB) > > But as > > cPickle.dumps(cx_Oracle.NUMBER) > > fails as well, I suppose it is not meant to work? > > -Harri > > > > > > This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |