Thread: File Too Large?

    #1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155

    File Too Large?


    I've come to the conclusion that my program is too big to be run. The Python Interpreter won't run the program, and when I open the program normally an error comes up too quickly too see it. Also, when I try to compile it with py2exe, about 9 errors pop up and then disappear instantly so I can't see what's wrong. Is there a way to fix this? My program has apporximately 15,000 lines of code. Thought: Is Python not able to run files over a certain amount of lines?
    Update: After sterring at the error every time it came up, I managed to piece together the error:
    Code:
    Offset too large
    Last edited by †Yegg†; March 16th, 2005 at 08:59 PM.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    Why not run the code inside PythonWin instead of double-clicking on the .py file. That way, you can see the error and exactly where it occurs as well.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    Thanks for that suggestion Scorpions4Ever. Here is the exact error:
    Code:
    >>> Traceback (most recent call last):
      File "C:\PYTHON23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 297, in RunScript
        codeObject = compile(f.read()+"\n", script, "exec")
    SystemError: com_backpatch: offset too large
    I have absolutely no idea what this means.
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    http://mail.python.org/pipermail/pyt...er/249827.html
    The rest of the posts in that thread make for very interesting reading too.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2004
    Location
    Middle Europa
    Posts
    1,200
    Rep Power
    14
    egal what language, 15'000 code lines... can you maintains this ?
    i know people killed for less.
    working on Solaris[5-9], preferred languages french and C.
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    I've come up with an idea since I didn't understand that post I read. It seems that the problem is because of the definition being too large, not the file. Maybe if I just split it into like 8-10 definitions and edit the code according it would work?

IMN logo majestic logo threadwatch logo seochat tools logo