Try this devel version, was: Re: [Zope] [zshell] ANN: 0.5 with wildcard expansion

Jason Cunliffe jasonic@nomadicsltd.com
Wed, 9 May 2001 10:34:40 -0400


From: "Jerome Alet" <alet@unice.fr>
> > > It happens the same to me.
> > > I'm running Zope 2.3.2 from source on Red Hat 7.1 and Python 1.5.2.
>
> > Same for me:
> > Zope 2.3.2 from source, SuSE 6.4 and Python 1.5.2  jaxml-2.22
>
> When you say it "HANGS", what is hanging ? Is it Zope which completely
> stops to answer your queries (Zope dies) ?

Zope does not die.. but the broswer never rueturns anyhting, like it is
looking for a page forever..
I can continue working with Zope.
I can close the window which had the zshell html annd bring it up again.
somethign is not 'reaching' the browser.

> Does the zshell redisplays itself when you click on "Run" but does
> nothing ?

RUN is broken. The browser indicats it is trying to redraw but it never
succeeds.
This is true for NS 4.5 and IE 5.5 on Win98se

> What command did you try ? As which user were you running zshell ?

None of the commands work.
Running as user with full manager role.
Is ther some other permsission needs to be set for the zhsell method?

> Please everyone try to describe the problem the more precisely possible,
> because I can't reproduce it ?
>
> And BTW, does the attached version solves the problem ?
>
> The attached document is a 0.6beta1 version gzipped zshell.py, replace the
> one you've already with this one and test again.

Thanks will try again.
Meanwhile have been reading throght the previous code better to understand.
What may be wrong.
I suspect 2 things:

1. jaxml
Fierst I tested from outside zope:

[jasonic@colocate05 jasonic]$ python
Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux
(egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import jaxml
>>> jaxml.__version__
'2.22'
>>> x = jaxml.XML_document()
>>> x.sometag(what="testing")
>>> x.anestedtag(name="nested")
>>> x._text("Waiting for Godot")
>>> x
<?xml version="1.0" encoding="iso-8859-1"?>
<sometag what="testing">
    <anestedtag name="nested">
        Waiting for Godot
    </anestedtag>
</sometag>

I then wrote a simple testjaxml.py External Method:

#testjaxml.py
import jaxml
def testjaxml.py(self):
    versionstring = jaxml.__version__
    return versionstring

calling this from Zope returns:
jaxml version2.22

ok so far so good
Then I extended testjaxml.py to include the same trivial jaxml tag test
above:

#testjaxml.py
import jaxml
import string

def testjaxml(self):
 versionstring =  "jaxml version" + jaxml.__version__
 x =jaxml.XML_document()
  x.sometag(what="testing")
 x.anestedtag(name="nested")
 x._text("Waiting for Godot")
 return x

This time it breaks:

Error Type: SyntaxError
Error Value: invalid syntax

Traceback (innermost last):
  File /web/Zope/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
  File /web/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /web/Zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: testjaxml)
  File /web/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /web/Zope-2.3.1-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: manage_edit)
  File /web/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
    (Object: manage_edit)
  File
/web/Zope-2.3.1-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 202, in manage_edit
    (Object: testjaxml)
  File
/web/Zope-2.3.1-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 209, in getFunction
    (Object: testjaxml)
  File /web/Zope/lib/python/App/Extensions.py, line 217, in getObject
    (Info: ('/web/Zope/Extensions/testjaxml.py', 'testjaxml'))
SyntaxError: (see above)

Either I am doign somthing nicreduibly basic and dumb or jaxml2.22 is not
very Zope freindly yet on this system. Not thta in the above Zoperror
message the path changes from /web/Zope/.. to /web/Zope-2.3.1-src/.. This is
becuae when I installed Zope I renamed the folder. Everythign else appears
to work ok, but sometimes I get errors like that still. Maybe I shoudl so a
nother fresh install

Jerome, please can you post a simple working standa-alone jaxml External
Method test file.

2. redirect problems
I am using Zope 2.3.2 on Redhat6.2 behind Apache Proxy/ProxyReverse
directives and SiteAcces/SiteRoot
Pehaps these are compounding the above problems.

I tried unsuccesffully to do a simple zshell install here on Windows last
night. I want to test without Apache in the picture, aso because I like to
wiorj with same Zope sintallation local and remote. Will try again today. I
had probems getting the right version of jaxml to be seeen by zope. This is
becuase I have multiple Zopes & Pythons on my Win98se laptop, and still
don't understand how to use distutils to get a  package correctly installed
inside of given version of Zope.

In other words I have previuously been using upgraded versions of jaxml from
IDLE and Pythonwin shells fine.  How the hell to do I install jaxml2.22 in
zope so its own Python will use that version? I put the jaxml folder in
various places lib/python and lib/python/Products. I added an __init__.py.

thasks for all your work. wil try now with new zshell-0.6b1, but jaxml
connection problems still need to be resolved.

./Jason
___________________________________________________________
Jason CUNLIFFE = NOMADICS['Interactive Art and Technology']