ZwenAusZwota / pyector

Automatically exported from code.google.com/p/pyector
0 stars 0 forks source link

maximum recursion depth exceeded when trying to save #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. stuff a lot with the bot, like listen an irc channel
2. do ector.write()

What is the expected output? What do you see instead?

self.memoize(obj)
RuntimeError: maximum recursion depth exceeded

What version of pyECTOR are you using?

0.4 Released

What version of Python are you using ?
On what operating system?

2.5 on debian lenny

Please provide any additional information below.

Good bot in fact, but this is big problem if it s impossible to save brain
to disk :/

Original issue reported on code.google.com by nicolas....@gmail.com on 26 Jan 2009 at 7:26

GoogleCodeExporter commented 8 years ago
That's true, I did not elaborate a lot on save.
Can you send the log file?
--
PS: I'm French, if you prefer, you can gmail me ;)

Original comment by francois.parmentier@gmail.com on 26 Jan 2009 at 11:16

GoogleCodeExporter commented 8 years ago

Original comment by francois.parmentier@gmail.com on 26 Jan 2009 at 11:17

GoogleCodeExporter commented 8 years ago

Original comment by francois.parmentier@gmail.com on 27 Jan 2009 at 8:15

GoogleCodeExporter commented 8 years ago
As the model of ECTOR is a network, there are many circular references, and I 
think
the maximum recursion depth is exceeded (what? that's what the error message 
says? true).

Now, I have to look for a solution...
As I have not explored this way, that article is a good beginning to me:
http://www.developertutorials.com/tutorials/python/python-persistence-management
-050405/page1.html

Original comment by francois.parmentier@gmail.com on 4 Apr 2009 at 12:19

GoogleCodeExporter commented 8 years ago
In the sys module, there are the methods getrecursionlimit and setrecursionlimit

On my system (Acer Aspire 5520)
sys.getrecursionlimit()
returns 1000

I managed to sys.setrecursionlimit(200000000), but even with this setting, 
pickle
eventually crashed. 

A solution to this might be to implement a custom save/load, instead of using 
pickle.
I will try and see if I can help with this.

Also, great program and concept.

Original comment by bogdan.i...@gmail.com on 13 Apr 2009 at 3:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
use cPickle as pickle

This line fixed my @write problems, seems to handle circular refs much better.

Regards,
Garagoth.

Original comment by garag...@gmail.com on 10 May 2009 at 8:35