> When I run the script from my bash shell it creates the videodb
> database file, but when I run it from the browser it doesn't
> create no file whatsoever.
This is usually due to wrong file permissions.
The script runs under the web server and this usually
has restricted access for security rea
<>
> Sorry for the delay but I was busy with soemthing else.
> The script prints the values of the variables fine in the
> browser so there must be a problem with the file writing part.
> When I run the script from my bash shell it creates the videodb
> database file, but when I run it from the b
Quoting Chad Crabtree <[EMAIL PROTECTED]>:
> Olli Rajala wrote:
>
> >
> >
> >
> >>Ok. I tried running the script on my Apache server on Windows NT
> and IT
> >>WORKS The script saves the values of videodb keys correctly.
> DARN!!!
> >>I don't get it. Why does the exact same script work on Win
Olli Rajala wrote:
>
>
>
>>Ok. I tried running the script on my Apache server on Windows NT
and IT
>>WORKS The script saves the values of videodb keys correctly.
DARN!!!
>>I don't get it. Why does the exact same script work on Win and not
on Linux.
>>
>>Oh, did I mention I am developing the
> Ok. I tried running the script on my Apache server on Windows NT and IT
> WORKS The script saves the values of videodb keys correctly. DARN!!!
> I don't get it. Why does the exact same script work on Win and not on Linux.
>
> Oh, did I mention I am developing the application on Linux. And
Quoting "Jacob S." <[EMAIL PROTECTED]>:
> Your error message says that you are getting an empty string from your cgi
> variable. I IMHO would suggest printing videodb['title'] before writing it
> to a file to see what the variable contains. Or you might print out videodb
> to see what the dictiona
Try an intermediate step
videodb={'title':title,'year':year,'director':director}
x=videodb['title'] #Sometimes this helps
print type(x)#Check x is a string
print x #see if it's got stuff
#save to database
try:
f=open(filename,'w')
except TypeError:
print "the error is
Hi!
Can I ask a few questions? (Other than this one...)
What output did you expect? A string, tuple, or what? I'm not strong with
cgi stuff.
Also, you don't need the string module 1) because you don't use it 2)
because you can use string methods.
Jacob Schmidt
> Hello!
>
> I am having some probl
Your error message says that you are getting an empty string from your cgi
variable. I IMHO would suggest printing videodb['title'] before writing it
to a file to see what the variable contains. Or you might print out videodb
to see what the dictionary looks like. My off the wall guess is that 1) Y
Quoting "Jacob S." <[EMAIL PROTECTED]>:
> Hi!
>
> Can I ask a few questions? (Other than this one...)
> What output did you expect? A string, tuple, or what?
A string output. When I create a dictionary variable from
the python shell like this:
videodb={'title':'Crash','year':'1996','director':'Da
Hello!
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
f.write(videodb['title'])
It just creates a blank file. When i try to access the
video
11 matches
Mail list logo