Hi,
I am pickling big graphs of data and running into this problem:
[...]
File "/usr/lib/python2.2/pickle.py", line 225, in save
f(self, object)
File "/usr/lib/python2.2/pickle.py", line 414, in save_list
save(element)
File "/usr/lib/python2.2/pickle.py", line 219, in save
self.save_reduc e(callable, arg_tup, state)
File "/usr/lib/python2.2/pickle.py", line 249, in save_reduce
save(state)
File "/usr/lib/python2.2/pickle.py", line 225, in save
f(self, object)
File "/usr/lib/python2.2/pickle.py", line 447, in save_dict
save(value)
File "/usr/lib/python2.2/pickle.py", line 219, in save
self.save_reduc e(callable, arg_tup, state)
File "/usr/lib/python2.2/pickle.py", line 245, in save_reduce
save(arg_tup)
File "/usr/lib/python2.2/pickle.py", line 225, in save
f(self, object)
File "/usr/lib/python2.2/pickle.py", line 374, in save_tuple
save(element)
File "/usr/lib/python2.2/pickle.py", line 225, in save
f(self, object)
File "/usr/lib/python2.2/pickle.py", line 405, in save_list
write(self.put( memo_len))
RuntimeError: maximum recursion depth exceeded
However, it works when i try the smallest examples and use
sys.setrecursio nlimit(4000)
This seems like a limitation in the pickling code. Yes?
The data is perhaps better off in some kind of DB designed for
massively interconnected objects. Any suggestions? ZODB ?
BTW, the data is path searching info for a game, and takes 1-2Mb of memory.
Thankyou,
Simon Burton. 1 5112
At 11:29 AM +1100 3/11/03, Simon Burton wrote: Hi,
I am pickling big graphs of data and running into this problem:
[...] File "/usr/lib/python2.2/pickle.py", line 225, in save f(self, object) File "/usr/lib/python2.2/pickle.py", line 414, in save_list save(element)
....
File "/usr/lib/python2.2/pickle.py", line 225, in save f(self, object) File "/usr/lib/python2.2/pickle.py", line 405, in save_list write(self.put( memo_len)) RuntimeError : maximum recursion depth exceeded
However, it works when i try the smallest examples and use sys.setrecursi onlimit(4000)
This seems like a limitation in the pickling code. Yes?
I would suspect that you have a loop in your definitions, eg. A
imports B, and B imports A, particularly since you're trying small
examples, and they're still exceeding the recursion depth.
Hope that helps,
Anthony
--
----------------------------------------------------
HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?! aB*****@wEStNeT .cOm.aU
---------------------------------------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill Loren |
last post by:
Hi ppl,
Trying to substitute some html tags within a big html file using RE ended up
with the "RuntimeError: maximum recursion limit exceeded" message.
Any idea why that might happen and how should one cope with it ?
thx
~B
(btw I'm trying to take off several <a href>s, i.e. substiture them with the
|
by: Georgy Pruss |
last post by:
Sometimes I get this error.
E.g.
>>> sum = lambda n: n<=1 or n+sum(n-1) # just to illustrate the error
>>> sum(999)
499500
>>> sum(1000)
............
RuntimeError: maximum recursion depth exceeded
|
by: Christian Tismer |
last post by:
Martin v. Löwis wrote:
> "Mark Hahn" <mark@hahnca.com> writes:
>
>
>>I don't understand how this could happen with pickle. Isn't it supposed to
>>stop when it runs into an object it has already pickled?
>
> Yes, and it does.
>
|
by: Sujit Marar |
last post by:
When I run on Webware(Python application Server),
there is a web Page that has a "Cancel" button , When
I press the Cancel button , I get the following error
based on the following code snippet
def Cancel(self):
"""
Cancel the current page
"""
log.debug("cancel()")
|
by: Michael Hohn |
last post by:
Hi,
under python 2.2, the pickle/unpickle sequence incorrectly restores
a larger data structure I have.
Under Python 2.3, these structures now give an explicit exception from
Pickle.memoize():
assert id(obj) not in self.memo
I'm shrinking the offending data structure down to find the problem
| |
by: andrewfelch |
last post by:
Hello all,
I'm using the metaclass trick for automatic reloading of class member
functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164
My problem is that if I
1) pickle an object that inherits from "AutoReloader"
2) unpickle the object
3) modify one of the pickled' object's derived class methods
4) reload the module holding the class
|
by: Victor Lin |
last post by:
Hi,
I encounter a problem with pickle.
I download a html from:
http://www.amazon.com/Magellan-Maestro-4040-Widescreen-Navigator/dp/B000NMKHW6/ref=sr_1_2?ie=UTF8&s=electronics&qid=1202541889&sr=1-2
and parse it with BeautifulSoup.
This page is very huge.
When I use pickle to dump it, a RuntimeError: maximum recursion depth
|
by: globalrev |
last post by:
i received an error maximum recursion depth when processing large
amounts of data.
i dont know exactly how many recursive calls i made but id assume
50000 or so.
is there a definitie limit to the nbr of calls or is the memory that
runs out? is that then the RAMmemory? is there a special amount of
memory assigned for python or it just takes and takes until windows
runs out of it?
|
by: mark starnes |
last post by:
Hi everyone, this is my first post to this group, so please be gentle.
I've written a class which, when I attempt to pickle, gives the error:
*** RuntimeError: maximum recursion depth exceeded
Is there a way to make pickle display data about what it's trying
to do? I'm thinking that if so, the recursive component will be
immediately visible, easing the bug hunt.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |