durusmail: quixote-users: cgi under Quixote 2.0
cgi under Quixote 2.0
2005-04-27
2005-04-27
cgi under Quixote 2.0
mso@oz.net
2005-04-27
Fabio Rojas wrote:
> I upgraded from Quixote 2.0a to 2.0 and the demo.cgi and
> server/cgi_server.py no longer work.  My domain is on a web hosting that
> supports only cgi.
>
>
>
> cgi_server.py reports:
>
> Status: 500 Internal Server Error
> Content-Type: text/plain
> Date: Wed, 27 Apr 2005 21:02:07 GMT
> Expires: -1
> Content-Length: 3307
>
> Traceback (most recent call last):
>    File
> "/home/farojas/bin/Python-2.3.4/Lib/site-packages/quixote/publish.py",
> line 273, in process_request
>      output = self.try_publish(request)
>    File
> "/home/farojas/bin/Python-2.3.4/Lib/site-packages/quixote/publish.py",
> line 248, in try_publish
>      assert path[:1] == '/'
> AssertionError
>
> ------------------------
>
> demo.cgi reports:
>
> Traceback (most recent call last):
>    File "demo.cgi", line 15, in ?
>      app = Publisher('quixote.demo')
>    File
> "/home/farojas/bin/Python-2.3.4/Lib/site-packages/quixote/publish.py",
> line 99, in __init__
>      if not callable(getattr(root_directory, '_q_traverse')):
> AttributeError: 'str' object has no attribute '_q_traverse'
>
> ------------------------
>
> Any ideas on what I should try?

In Quixote 2, the Publisher argument is a quixote.directory.Directory
instance, not a string.  Perhaps you can use publisher1 to avoid changing
your existing application, but you'd still have to change some imports
like form to form1.

I'm not sure about the AssertionError.  It may be cascading from the other
error, it could be another Q1-ism in your application, or maybe you forgot
the final slash in your request and Q2 handles it differently than Q1
does.  Again, publisher1 may help if you don't want to update your
application.

reply