Problem with "open"...

Michael Boyles mjboyles at
Mon Aug 16 18:25:51 CEST 1999

I am a very new user to python, but I thought I picked it up pretty
quickly. The code I have been using has been working for several
months now. I recently reorganized the modules (placement in the .py
file) and renamed some variables (nothing fancy) and I now get an
error from the following code:

class effect:
  def render():

  def createViewFile(self, filename):
    f = open(filename, "w")

The error is on the "open" function. It reads:
  Exception in Tkinter callback
  Traceback (innermost last):
  File "/usr/local/lib/python1.5/lib-tk/", line 726, in __call__
    return apply(self.func, args)
  File "/usr/people/mjboyles/effect/bin/", line 156, in render
  File "", line 423, in render
    f = open(("%s.vf" % name), 'w')
  TypeError: illegal argument type for built-in operation

Any suggestions? I have no idea about the error. When I try the
function during regular interperator mode from the prompt, it works
fine. Is there a description about the possible python errors

Thanks in advance...
- Mike
 _/                                                   \_
|  Michael Boyles                  Research Programmer  |
|  Advanced Visualization Lab       Indiana University  |
|_ mjboyles at _|

More information about the Python-list mailing list