Hi,
I'm new to Zope and I've been examining the LoginManager
example given by dlpierson (http://www.zope.org/Members/dlpierson/sqlLogin).
Although I am nowhere near understanding what it is doing, I'm very close to
getting it to work - I think! It looks to me like I'm falling down in the
PythonMethods (PythonScripts) in the Member ZClass. Are PythonScript
arguments typeless? I keep getting an error
Error Type: AttributeError
Error Value: 'string' object has no attribute 'password' from the authenticate method which I'm passing
self,password.
Strangely following this error, I can hit the back button on
my browser and reach the protected HTML page anyway! Here is the
traceback. Your help would be appreciated.
<!-- Traceback (innermost last): File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 222, in publish_module File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 187, in publish File D:\PROGRA~1\WEBSITE\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 162, in publish File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\BaseRequest.py, line 444, in traverse File D:\PROGRA~1\WEBSITE\lib\python\Products\LoginManager\LoginManager.py, line 237, in validate (Object: ProviderContainer) File D:\PROGRA~1\WEBSITE\lib\python\Products\LoginManager\LoginMethods.py, line 246, in findLogin (Object: PlugInBase) File D:\PROGRA~1\WEBSITE\lib\python\Shared\DC\Scripts\Bindings.py, line 324, in __call__ (Object: authenticate) File D:\PROGRA~1\WEBSITE\lib\python\Shared\DC\Scripts\Bindings.py, line 353, in _bindAndExec (Object: authenticate) File D:\PROGRA~1\WEBSITE\lib\python\Products\PythonScripts\PythonScript.py, line 330, in _exec (Object: authenticate) (Info: ({'script': <PythonScript instance at 01596818>, 'context': SMKELLOCK, 'container': SMKELLOCK, 'traverse_subpath': []}, ('colenso9', <h3>form</h3><table><tr valign="top" align="left"><th>__ac_password</th><td>'colenso9'</td></tr><tr valign="top" align="left"><th> Log In </th><td>' Log In '</td></tr><tr valign="top" align="left"><th>__ac_name</th><td>'SMKELLOCK'</td></tr></table><h3>cookies</h3><table><tr valign="top" align="left"><th>sql_pref__cols</th><td>'50'</td></tr><tr valign="top" align="left"><th>dtpref_cols</th><td>'85'</td></tr><tr valign="top" align="left"><th>sql_pref__rows</th><td>'15'</td></tr><tr valign="top" align="left"><th>dtpref_rows</th><td>'15'</td></tr><tr valign="top" align="left"><th>tutorialExamplesURL</th><td>'http://sharonk:8080/ZopeTutorial/examples/lesson3'</td></tr></table><h3>other</h3><table><tr valign="top" align="left"><th>dtpref_rows</th><td>'15'</td></tr><tr valign="top" align="left"><th>__ac_password</th><td>'colenso9'</td></tr><tr valign="top" align="left"><th>__ac_name</th><td>'SMKELLOCK'</td></tr><tr valign="top" align="left"><th>dtpref_cols</th><td>'85'</td></tr><tr valign="top" align="left"><th>BASE3</th><td>'http://sharonk:8080/FinanceNow/index_html'</td></tr><tr valign="top" align="left"><th>BASE2</th><td>'http://sharonk:8080/FinanceNow'</td></tr><tr valign="top" align="left"><th>BASE1</th><td>'http://sharonk:8080'</td></tr><tr valign="top" align="left"><th>BASE0</th><td>'http://sharonk:8080'</td></tr><tr valign="top" align="left"><th>URL1</th><td>'http://sharonk:8080/FinanceNow'</td></tr><tr valign="top" align="left"><th>SERVER_URL</th><td>'http://sharonk:8080'</td></tr><tr valign="top" align="left"><th>AUTHENTICATED_USER</th><td>LoggingInUser</td></tr><tr valign="top" align="left"><th>TraversalRequestNameStack</th><td>[]</td></tr><tr valign="top" align="left"><th>sql_pref__rows</th><td>'15'</td></tr><tr valign="top" align="left"><th>URL2</th><td>'http://sharonk:8080'</td></tr><tr valign="top" align="left"><th>URL0</th><td>'http://sharonk:8080/FinanceNow/index_html'</td></tr><tr valign="top" align="left"><th> Log In </th><td>' Log In '</td></tr><tr valign="top" align="left"><th>sql_pref__cols</th><td>'50'</td></tr><tr valign="top" align="left"><th>PUBLISHED</th><td>&lt;DTMLDocument instance at 0141CAE8&gt;</td></tr><tr valign="top" align="left"><th>URL</th><td>'http://sharonk:8080/FinanceNow/index_html'</td></tr><tr valign="top" align="left"><th>LOGIN_METHODS</th><td>[]</td></tr><tr valign="top" align="left"><th>tutorialExamplesURL</th><td>'http://sharonk:8080/ZopeTutorial/examples/lesson3'</td></tr><tr valign="top" align="left"><th>URL0</th><td>http://sharonk:8080/FinanceNow/index_html</td></tr><tr valign="top" align="left"><th>URL1</th><td>http://sharonk:8080/FinanceNow</td></tr><tr valign="top" align="left"><th>URL2</th><td>http://sharonk:8080</td></tr><tr valign="top" align="left"><th>BASE0</th><td>http://sharonk:8080</td></tr><tr valign="top" align="left"><th>BASE1</th><td>http://sharonk:8080</td></tr><tr valign="top" align="left"><th>BASE2</th><td>http://sharonk:8080/FinanceNow</td></tr><tr valign="top" align="left"><th>BASE3</th><td>http://sharonk:8080/FinanceNow/index_html</td></tr></table><h3>environ</h3><table><tr valign="top" align="left"><th>SCRIPT_NAME</th><td></td></tr><tr valign="top" align="left"><th>HTTP_ACCEPT_ENCODING</th><td>gzip, deflate</td></tr><tr valign="top" align="left"><th>CONTENT_LENGTH</th><td>60</td></tr><tr valign="top" align="left"><th>channel.creation_time</th><td>980842631</td></tr><tr valign="top" align="left"><th>HTTP_REFERER</th><td>http://sharonk:8080/FinanceNow</td></tr><tr valign="top" align="left"><th>HTTP_EXTENSION</th><td>Security/Remote-Passphrase</td></tr><tr valign="top" align="left"><th>SERVER_PROTOCOL</th><td>1.1</td></tr><tr valign="top" align="left"><th>CONTENT_TYPE</th><td>application/x-www-form-urlencoded</td></tr><tr valign="top" align="left"><th>PATH_TRANSLATED</th><td>\FinanceNow</td></tr><tr valign="top" align="left"><th>HTTP_ACCEPT</th><td>application/vnd.ms-excel, application/msword, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*</td></tr><tr valign="top" align="left"><th>REQUEST_METHOD</th><td>POST</td></tr><tr valign="top" align="left"><th>SERVER_SOFTWARE</th><td>Zope/Zope 2.3.0 (binary release, python 1.5.2, win32-x86) ZServer/1.1b1</td></tr><tr valign="top" align="left"><th>HTTP_COOKIE</th><td>sql_pref__rows=&quot;15&quot;; sql_pref__cols=&quot;50&quot;; dtpref_rows=&quot;15&quot;; dtpref_cols=&quot;85&quot;; tutorialExamplesURL=&quot;http://sharonk:8080/ZopeTutorial/examples/lesson3&quot;</td></tr><tr valign="top" align="left"><th>PATH_INFO</th><td>/FinanceNow</td></tr><tr valign="top" align="left"><th>HTTP_ACCEPT_LANGUAGE</th><td>en-nz</td></tr><tr valign="top" align="left"><th>HTTP_HOST</th><td>sharonk:8080</td></tr><tr valign="top" align="left"><th>GATEWAY_INTERFACE</th><td>CGI/1.1</td></tr><tr valign="top" align="left"><th>SERVER_PORT</th><td>8080</td></tr><tr valign="top" align="left"><th>SERVER_NAME</th><td>sharonk</td></tr><tr valign="top" align="left"><th>REMOTE_ADDR</th><td>200.0.0.2</td></tr><tr valign="top" align="left"><th>HTTP_USER_AGENT</th><td>Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Xtra)</td></tr><tr valign="top" align="left"><th>CONNECTION_TYPE</th><td>Keep-Alive</td></tr></table>), {}, None)) File Script (Python), line 2, in authenticate AttributeError: (see above) --> -------------------------------------------------------------------------------------------------------------
W.Robert Kellock Ph: +64 3 326 6115 Sales Manager Fax: +64 3 326 6115 Credit Systems Control Ltd Web: www.creditscore.co.nz "making decisions easy" ------------------------------------------------------------------------------------------------------------- |
- [Zope] LoginManager dlpierson example W. Robert Kellock
- Re: [Zope] LoginManager dlpierson example Fred Yankowski
- Re: [Zope] LoginManager dlpierson example W. Robert Kellock
- Re: [Zope] LoginManager dlpierson example Fred Yankowski