At 11:50 AM 10/26/2001 -0400, [EMAIL PROTECTED] wrote:
>I think I've come across a small initialization bug in MiddleKit. When
>kicking off AppServer in a WebKit work directory created by
>MakeAppWorkDir.py, MiddleKit fails with the following error message:
>
>traceback (most recent call last):
>   File "/opt/Webware/WebKit/AppServer.py", line 188, in loadPlugIn 
> plugIn.install()
>   File "/opt/Webware/WebKit/PlugIn.py", line 101, in install 
> self._module.InstallInWebKit(self._appServer)
>   File "/opt/Webware/MiddleKit/__init__.py", line 13, in InstallInWebKit 
> assert mkPathVia__file__==mkPathViaAppServer, '
>\nmkPathVia__file__=%r\nmkPathViaAppServer=%r\n' % (
>AssertionError:
>mkPathVia__file__='/opt/Webware/MiddleKit'
>mkPathViaAppServer='/home/elian/MiddleKit'
>
>ERROR: Plug-in /opt/Webware/MiddleKit raised exception.
>
>
>To my inexperienced eyes, it looks like the path formed for
>mkPathViaAppServer is not using the information provided by variable
>AppWorkDir (which is set to '/home/elian/WebwareTest' in my OneShot.cgi
>file.
>
>...Edmund.

Nice catch. Thanks for the report. I think there are 2 problems here.

In MiddleKit's __init__.py, I'm just trying to get the path to the 
MKBrowser subdirectory. It seemed to me that using __file__ and 
appServer.serverSidePath() were both valid approaches, so I used both and 
asserted their equality.

For starters, "mkPathViaAppServer" should really be named "mkPathViaApp", 
since it uses app.serverSidePath(), not appServer. But that's cosmetic (and 
now fixed in CVS).

Ultimately, this is falling back on the app's serverSidePath which comes 
from the appServer which gets it as the "path" argument to __init__().

So this is either a bug in the MakeAppWorkDir feature (written by Robin 
Dunn), or a misunderstanding of app.serverSidePath() on my part (I wrote 
the __init__.py for MiddleKit). And I think it's both!

Your mkPathVia__file__ ends up being '/opt/Webware/MiddleKit' which is 
probably the valid container for MKBrowser, so that should be the only 
technique I use.

But your mkPathViaApp ends up being '/home/elian/MiddleKit' when you said 
that you specified /home/elian/WebwareTest as the directory. Robin, can 
confirm that this is a bug regarding MakeAppWorkDir and 
app.serverSidePath() and fix it?


-Chuck


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

Reply via email to