A little confuse
Fredrik Lundh
fredrik at pythonware.com
Sun Nov 19 11:22:04 EST 2006
infotechsys at pivot.net wrote:
> When I run this code in the pdb it works.
> accountNbr = 1
> for testLine in ftest.readlines():
> acct = testLine[1:2] #there account number
> if accountNbr == int(acct):
> accountNbr = accountNbr + 1
>
> When I run without the debugger I get this error.
>
> File "./casco.py", line 62, in process
> if accountNbr == int(acct):
> ValueError: invalid literal for int(): "
>
> Can someone explain?
adding a
print repr(acct), repr(testLine)
debug statement after the "acct = testLine" line might give you the
clues you need to solve this.
</F>
More information about the Python-list
mailing list