[Zope] Fourth request for help - Win2K+Zope

Michael Simcich msimcich@accesstools.com
Sun, 27 Feb 2000 13:24:01 -0800


Hi Martijn -

I work with MS tools and OS all day long. Believe me I know the way that
those products are a house of cards.

And thanks for posting about the debugger. I just kept hitting 's' and
eventually I got:

(Pdb) s
> z2.py(441)?()
-> import ZServer
(Pdb) s
NameError: 'Case mismatc...ope\\zserver)'
> z2.py(441)?()
-> import ZServer
(Pdb) s
> C:\Program Files\Python\Lib\exceptions.py(65)__init__()
-> def __init__(self, *args):
(Pdb) s
> C:\Program Files\Python\Lib\exceptions.py(66)__init__()
-> self.args = args
(Pdb) s
--Return--
> C:\Program Files\Python\Lib\exceptions.py(66)__init__()->None
-> self.args = args
(Pdb) s
Traceback (innermost last):
  File "z2.py", line 441, in ?
    import ZServer
NameError> C:\Program Files\Python\Lib\exceptions.py(68)__str__()
-> def __str__(self):
(Pdb) s
> C:\Program Files\Python\Lib\exceptions.py(69)__str__()
-> if not self.args:
(Pdb) s
> C:\Program Files\Python\Lib\exceptions.py(71)__str__()
-> elif len(self.args) == 1:
(Pdb) s
> C:\Program Files\Python\Lib\exceptions.py(72)__str__()
-> return str(self.args[0])
(Pdb) s
--Return--
> C:\Program Files\Python\Lib\exceptions.py(72)__str__()->'Case
mismatc...ope\\z
server)'
-> return str(self.args[0])
(Pdb) s
: Case mismatch for module name ZServer
(filename E:\zope\zserver)

E:\zope>

This is what we were looking for... the case mismatch was a clue. I
remembered that after installing zope on this machine the Zope dir was
called ZOPE (uppercase) for some reason (I didn't request that). I
innocently renamed it to zope with explorer. So I tried two things to fix
it. First I renamed the existing zope dir to zopex and ran a fresh install
into a new zope dir. After that I searched the registry for zope and found
one line that had

"E:\ZOPE\BIN\LIB\WIN32\PYTHON~1.EXE"

which I switched to lowercase. Now Zope runs fine <g>. I don't know if both
of these items were required but I'm reporting them to you just in case they
are. I'm kind of surprised that case sensitivity enters in here, I know it's
important in the unix realms, but didn't think it would carry over here. In
any case it works now.

Martijn, I am extremely grateful to you for your help. And I'm glad it was
so simple in the end.

Michael Simcich
AccessTools

-----Original Message-----
From: Martijn Pieters [mailto:mj@digicool.com]
Sent: Sunday, February 27, 2000 1:17 AM
To: Michael Simcich; zope@zope.org
Subject: Re: [Zope] Fourth request for help - Win2K+Zope


From: "Michael Simcich" <msimcich@accesstools.com>
> This is a realatively clean install of Windows 2000. I guess I will try
the
> python lists, but immediately... I have no idea about pyhthon, so... and
no
> I don't have any VPN software running.
>

Okay, it was just a hunch, something that has proven to be a problem before.

> By platform I wasn't referring to Win vs Linux, I intend to use Linux in
the
> long run and am experimenting with it now. I just don't need it's learning
> curve at the same time I'm of dealing with Zope/Python's. I was referring
to
> application development platforms. The group of tools I've been
> evaluating/working with include zope, php, asp, and cf. As far as I can
> tell, having had only minor hands on with zope, it's the most interesting
> fit for my needs. But if I can't get the thing to turn over... then it's
not
> relevant.
>
> I think this experience has shown me some of what it means to work with a
> product that's less mainstream than what I'm used to. I've pretty much
> worked with VB level tools. I guess I'm somewhat spoiled by the huge pool
of
> experienced users with those products.
>

I have seen VB tools do pretty strange things. Not because the VB tools were
wrong, just because the Windows platform is a unstable heap of interreleated
DLLs that is build like a cardhouse. When a piece of software breaks, you
cannot always tell where it goes wrong. You cannot even be sure that the
software broke because of a bug, or because of Windows.

> I still have a hard time believing that there isn't like... you know,
> something I can check? A setting? That the Zope community knows about.
This
> is perhaps part of what was brought up in another thread running here,
that
> perhaps in comparison with more widely used products like perl or php,
Zope
> is in some ways a bit resource thin. This would almost have to be the
case,
> it's just newer and has a smaller community behind it. I'm sure this will
> change. Since all of the languages are imperfect, at first they all have
> some dimly lit corners that need discovery and documentation.

I am not sure it is Zope in this case. Others have reported that Zope works
on their Win2k install, without problems. There just isn't anything in Zope
I can think of that might be causing this.

>
> BTW, I dont' get anything like a python.exe Application Error, I just
get...
> absolutely nothing. No errors, nothing.

Windows is never very forward with error reports.

Right. Lets see what we can get out of Zope here:

- Don't use start.bat. Use the command prompt instead.
- First, edit z2.py. At line 216, just above the comments and a line that
starts with swhome, insert:

  import pdb
  pdb.set_trace()

- cd to the Zope directory.
- type: bin\python.exe z2.py -D

If everything goes according to plan, you'll be put into the Python
Debugger. 's' steps to the next statement, 'n' steps over the next
statement. Typing a variable name will print it. Here is the output if I run
a few steps:

  --Return--
  > D:\Program Files\Python\Lib\pdb.py(868)set_trace()->None
  -> Pdb().set_trace()
  (Pdb) s
  > z2.py(220)?()
  -> swhome=r'D:\Program Files\Zope'
  (Pdb) s
  > z2.py(221)?()
  -> import sys
  (Pdb) swhome
  'D:\\Program Files\\Zope'
  (Pdb)

This is on a Win98 machine, with Python itself installed as well. The pdb
was imported from the Python path, instead of the Zope python path, but it
should make no difference here. You might want to read the pdb manual:

  http://www.python.org/doc/lib/debugger-commands.html

Stepping through, you will probably hit a point where things go wrong, i.e.,
Python exists without an error. But we can at least see if Python will run
at all, and if so, how far you can get.

Let us know what happens!

--
Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------