<type 'exceptions.TypeError'>: an integer is required
Ulrich Eckhardt
eckhardt at satorlaser.com
Mon Jun 15 07:25:14 EDT 2009
jeni wrote:
[ ..large backtrace.. ]
For your own sake and that of your readers, try next time to reduce the code
that causes the problems to a minimal example. This prevents people from
guessing or simply ignoring your problems.
> /home/Activities/Kremala.activity/Kremala.py in insert_text_file
> (self=<KremalaActivity object at 0x83e22d4 (SugarActivity at 0x86a7800)
>>, strng='geografia:1 nikh me 2 prospatheies\n')
> --> t=open("elements_file.txt", "a")
> global open=<built-in function open>
open() doesn't take a string as second parameter, see 'help(open)'. Instead,
it takes one of the integers which are defined as symbols in the os module,
see 'dir(os)'.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
More information about the Python-list
mailing list