liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

MemoryError on dumpscript #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.Not sure, but I guess including a big database. My mysql dump script of 
the DB was 14mb, if that tells anything.

What is the expected output? What do you see instead?
A successfully dumped db is expected but I get a MemoryError.

What version of the product are you using? On what operating system?
0.4.1 on a Vista64 machine (8gb ram)

Please provide any additional information below.

All models get processed successfully but then it gives me a MemoryError. 
It works if I remove the biggest app from the installed apps.

Traceback (most recent call last):
  File "D:\projects\secretproject\manage.py", line 11, in <module>
    execute_manager(settings)
  File "D:\geek\django\django\core\management\__init__.py", line 362, in 
execute_manager
    utility.execute()
  File "D:\geek\django\django\core\management\__init__.py", line 303, in 
execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\geek\django\django\core\management\base.py", line 195, in 
run_from_argv
    self.execute(*args, **options.__dict__)
  File "D:\geek\django\django\core\management\base.py", line 222, in 
execute
    output = self.handle(*args, **options)
  File "C:\Python25\Lib\site-
packages\django_extensions\management\commands\dumpscript.py", line 54, in 
handle
    print Script(models=models, context=context)
  File "C:\Python25\Lib\site-
packages\django_extensions\management\commands\dumpscript.py", line 110, in 
__str__
    return flatten_blocks(self.lines, num_indents=self.indent)
  File "C:\Python25\Lib\site-
packages\django_extensions\management\commands\dumpscript.py", line 388, in 
flatten_blocks
    return "\n".join([ flatten_blocks(line, num_indents+1) for line in 
lines ])
MemoryError

Original issue reported on code.google.com by nix...@gmail.com on 2 Jul 2009 at 7:13