[Tutor] CGI Video collection application File I/O troubles
domain.admin at online.ie
Sun Dec 5 23:08:10 CET 2004
I am having some problems with a simple CGi application I am
coding for my gf. It is supposed to be a video collection
program. I can't manage to write the value of a dictionary
key to a file. Like thisL
It just creates a blank file. When i try to access the
videodb['title'] key from the python shell it prints
out the correct value respecitvely. Even when I use the
print command to write to a HTML file it outputs the
correct value of videodb['title'] for example.
When I run the script in python shell it says:
TypeError: argument 1 must be string or read-only character buffer, not None
Why doesn't it write the value to the file?
Here's the complete source code:
print "Content-type: text/html\n"
#extract variable s
#save to database
The lady on the call box in Monkey Island 2
Guybrush: I'm lost in the Inky Island Jungle in Monkey 2
Lady: Just walk off the edge of the screen
More information about the Tutor