[zope] [Zope] Authentication Error on python script db submit

Phil Harris phil.harris@zope.co.uk
Tue, 17 Jun 2003 14:24:18 +0100


Where exactly is this script? and what type is it?

If it's an external method then it isn't.

If it's a Script (Python) then MySQLdb isn't available.



On Tue, 17 Jun 2003 23:14:35 +1000, Wayne Connolly <wayne@c-media.com.au> 
wrote:

> Hi,
>
> I am trying to connect to a db and UPDATE or INSERT, if the update fails, 
> some data.
>
> The script saves without a error but once the script it run the Zope 
> Authentication window pops up. After 3 login attempts, i know the 
> password :-P, it produces the stupid error "Error Type: Unauthorized
> Error Value: You are not allowed to access connect in this context
> "
> The Proxy roles are set to authenticated on the script(i have tried 
> manager and owner and all 3 at same time).
>
> The script is below.
> -------------------------------------------------------------------------- 
>
>
> #!/usr/bin/python
> # import MySQL module import MySQLdb
> # connect db = MySQLdb.connect(host="localhost", user="myUserName", 
> passwd="myPassWord", db="names")
> # create a cursor cursor = db.cursor()
> # execute SQL statement cursor.execute("""INSERT INTO charts (firstname, 
> lastname)""") ------------------------------------------------------------ 
>
>
> --------------
>
> Any idea's...
>
> Wayne
>



-- 
Phil Harris