Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Aditya Lal
On 10/31/07, Orest Kozyar [EMAIL PROTECTED] wrote: Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email.

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Eric Brunson
Orest Kozyar wrote: Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email. ### SCRIPT OUTPUT

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Eric Brunson
Orest Kozyar wrote: Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email. It appears you have a

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Kent Johnson
Orest Kozyar wrote: Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email. I've poked at this a little.

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Orest Kozyar
It appears you have a cyclic reference in your doc object. Try adding doc.unlink() before you add it to your shelf. That fixed the problem. I did not realize that XML documents could have cyclic references. Thanks for all your help! Orest ___

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Kent Johnson
Eric Brunson wrote: Orest Kozyar wrote: Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email.

Re: [Tutor] perplexing error with shelve REVISED

2007-10-31 Thread Orest Kozyar
It appears you have a cyclic reference in your doc object. Try adding doc.unlink() before you add it to your shelf. Actually, I just realized that doc.unlink() seems to delete the entire XML content, which kind of defeats the purpose of caching it. I'll check on xml-sig and the

[Tutor] perplexing error with shelve

2007-10-30 Thread Orest Kozyar
I have a program which queries an online database (Medline) for XML data. It caches all data using shelve to avoid hitting the database too many times. For some reason, I keep getting a RuntimeError: maximum recursion depth exceeded when attempting to add a certain record. This program has

Re: [Tutor] perplexing error with shelve REVISED

2007-10-30 Thread Bob Gailer
Orest Kozyar wrote: I have a program which queries an online database (Medline) for XML data. It caches all data using shelve to avoid hitting the database too many times. For some reason, I keep getting a RuntimeError: maximum recursion depth exceeded when attempting to add a certain record.

Re: [Tutor] perplexing error with shelve

2007-10-30 Thread bob gailer
Orest Kozyar wrote: I have a program which queries an online database (Medline) for XML data. It caches all data using shelve to avoid hitting the database too many times. For some reason, I keep getting a RuntimeError: maximum recursion depth exceeded when attempting to add a certain record.

Re: [Tutor] perplexing error with shelve REVISED

2007-10-30 Thread Orest Kozyar
Please post the entire traceback (omitting duplicate lines). Sorry, I should have included the traceback. I've revised the sample script so that it generates the traceback when run. The sample script is at the very bottom of this email. ### SCRIPT OUTPUT ### [kozyar]:~$ python