I think this has something to do with sys.path.

If you change the first line to:

from WebKit.Page import Page

I think it will work.  Basically, two copies of the module Page, and
hence Servlet, are getting imported.  I know there was lots of work on
how sys.path was going to work, but apparently it can still cause
problems.

"Bruce Pearson &/or Gwyn Ingham" <[EMAIL PROTECTED]> wrote:
> I am just testing WebWare.
> With this simple test page I get an assertion error.
> What am I doing wrong?
> 
> (Test.py)
> 
> from Page import Page
> 
> class Test(Page):
> 
>       def writeContent(self):
>               self.writeln('<P>Testing</P>')
> 
> 
> 
> 
> 
> Traceback (most recent call last):
>   File "WebKit\Application.py", line 306, in dispatchRequest
>     self.handleGoodURL(transaction)
>   File "WebKit\Application.py", line 412, in handleGoodURL
>     self.createServletInTransaction(transaction)
>   File "WebKit\Application.py", line 756, in createServletInTransaction
>     inst = self.getServlet(transaction,path,cache)
>   File "WebKit\Application.py", line 684, in getServlet
>     inst = factory.servletForTransaction(transaction)
>   File "WebKit\ServletFactory.py", line 89, in servletForTransaction
>     assert issubclass(theClass, Servlet), '%s is not sub class of Servlet' %
> theClass
> AssertionError: Test is not sub class of Servlet
> 
> Thanks for you help,
> Bruce Pearson.
> 
> 
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/webware-discuss
> 

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to