Menu

#97 python 2.5 fake_getline wrong number of arguements

open
nobody
None
5
2006-09-26
2006-09-26
Greg Hazel
No

File "traceback.pyo", line 298, in extract_stack
TypeError: fake_getline() takes exactly 2 arguments
(3 given)

Discussion

  • Ori Avtalion

    Ori Avtalion - 2007-02-11

    Logged In: YES
    user_id=854801
    Originator: NO

    Another testcase on 2.5. regularly it gives a ValueError. when py2exe'd, it gives the fake_getline error:

    import sys
    try:
    for (a, b) in [[1]]:
    print a, b
    except:
    if sys.exc_info()[0] != KeyboardInterrupt:
    print "An error has occured!"
    import traceback
    traceback.print_exc()

     
  • Nobody/Anonymous

    Logged In: NO

    similar issue reported with workaround: http://osdir.com/ml/python.pyobjc.devel/2006-10/msg00031.html

    You can also implement a workaround on windows:

    Modify C:\Python25\Lib\site-packages\py2exe\boot_common.py
    Line 93

    OLD: def fake_getline(filename, lineno):
    NEW: def fake_getline(filename, lineno, module_globals=None):

    Tested on win xp sp2, enu, py 2.5 with py2exe 0.6.5

    Ann Brady

     

Log in to post a comment.