Re: MemoryError query

Kirill Simonov <xi-RCSp1WnSyaseIZ0/[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
On 07/15/2011 04:55 AM, [email protected] wrote:
> I am using PyYaml with libyaml.   When trying to read a 100Mb YAML file, I get the following error.  This is on a machine with 4G RAM.   How can this happen?
> Keith
>
> kbriggs@gold>  time python germany.py
>
> yaml_loader_01: germany.pkl does not exist; will build it Traceback (most recent call last):
>    File "germany.py", line 21, in<module>
>      data=Germany()
>    File "germany.py", line 9, in __init__
>      s.d=yaml_safe_load('germany.yaml')
[...]
>      if regexp.match(value):
> MemoryError

Hard to tell without seeing the input file, but from the traceback, it 
dies on regexp matching.  You can learn more if you determine the 
failing regexp and the input value.

Thanks,
Kirill

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.