[Zope] Login Manager problem

2000-10-30 Thread Luca Mearelli

Hello,
I posted this some days ago on zope-ptk and zope-dev mailing list,
but got no response, so I thought I've sent it to the wrong mailing list,
here is waht happens, and a possible solution  :-)
 
I had a strange problem when trying out LoginManager v0.8.8b1 with the latest cvs 
Checkout (as of Oct.23),
 here is the traceback trying to add a LoginManager (The form didn't show up):

Error Type: NameError
Error Value: path
...
Traceback (innermost last):
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/tmp/Zope2/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: addLoginManager)
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: addLoginManager)
  File /usr/local/tmp/Zope2/lib/python/App/special_dtml.py, line 120, in __call__
(Object: addLoginManager)
(Info: /usr/local/tmp/Zope2/lib/python/Products/LoginManager/addLoginManager.dtml)
  File /usr/local/tmp/Zope2/lib/python/DocumentTemplate/DT_String.py, line 528, in 
__call__
(Object: addLoginManager)
  File /usr/local/tmp/Zope2/lib/python/DocumentTemplate/DT_In.py, line 633, in 
renderwob
(Object: UserSourcesMetaTypes(this()))
  File /usr/local/tmp/Zope2/lib/python/DocumentTemplate/DT_Util.py, line 331, in eval
(Object: UserSourcesMetaTypes(this()))
(Info: UserSourcesMetaTypes)
  File /usr/local/tmp/Zope2/lib/python/ZPublisher/HTTPRequest.py, line 772, in 
__getitem__
NameError: (see above)

after looking at the LM code I found that the manage_addLoginManagerForm is defined 
in LoginManager.py:
...
manage_addLoginManagerForm = HTMLFile('addLoginManager', globals(),
UserSourcesMetaTypes = PlugInFinder(LoginManager.UserSourcesGroup),
LoginMethodsMetaTypes = PlugInFinder(LoginManager.LoginMethodsGroup))
...


At first I thought it could have been a LM problem, removing 
UserSourcesMetaTypes(this()) let
the form appear, but when I focused on the UserSourcesMetaTypes work, and how the user 
sources
PlugIns get installed I found nothing (It was actually my first test with LM  
ZPatterns), moreover
there was no mention of such problems by anyone else on the Mailing Lists.

Then I tried to it on a Zope 2.2.0 (released) and it worked fine adding the LM.
So it should have been something with my Zope CVS checkout, when looked at the 
HTTPRequest.py
file at the line shown in the Traceback, i found a possible error with "__getitem__"
When it tries to return the value of UserSourcesMetaTypes, it enters the "if 
key[:1]=='U':" at line 760
since UserSourcesMetaTypes starts with 'U', but match is empty, therefore path is not 
initialized
and at the line 772 we have the NameError.
Putting the lines 772-774 inside the "if match is not None:" fixed the problem (I 
included a diff for this),
is it the right way to go, is it enough? I think so but I have a small knowledge of 
Zope internals so 
I'm not completely sure i.e. if we want to match only the env.variables starting with 
"URL" why not even change
the  "if key[:1]=='U':" into "if key[:3]=='URL':"?

Thanks
   Luca Mearelli

*** HTTPRequest.py  Mon Oct 23 15:32:09 2000
--- HTTPRequest.py.OLD  Mon Oct 23 14:55:51 2000
***
*** 769,777 
  path = [''] + path[:n]
  else:
  path = [other['SERVER_URL']] + path[:n]
!   other[key] = URL = join(path, '/')
!   self._urls = self._urls + (key,)
!   return URL
  
  if isCGI_NAME(key) or key[:5] == 'HTTP_':
  environ=self.environ
--- 769,777 
  path = [''] + path[:n]
  else:
  path = [other['SERVER_URL']] + path[:n]
! other[key] = URL = join(path, '/')
! self._urls = self._urls + (key,)
! return URL
  
  if isCGI_NAME(key) or key[:5] == 'HTTP_':
  environ=self.environ




[Zope] Login Manager

2000-10-08 Thread Mark Twiddy

Hi

I've been tring to install Login Manager. I installed ZPattens ok and it
works but i am unable to get login manager going.

file "/home/markt/Zope/lib/python/Products/LoginManager/LoginManager.py",
line 9, in ?
from Products.ZPatterns.SheetProviders import SheetProviderContainer
ImportError: cannot import name SheetProviderContainer


any help would be great

Thanks 
Mark


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] [Zope]login manager error

2000-08-01 Thread Owen Smith

on zope startup I get this

zope@phonix:/usr/local/dc/zope$ --
2000-08-01T13:39:45 ERROR(200) Zope Couldn't import
Products.LoginManager
Traceback (innermost last):
  File /usr/local/dc/zope/lib/python/OFS/Application.py, line 396, in
import_products
(Object: string)
  File /usr/local/dc/zope/lib/python/Products/LoginManager/__init__.py,
line 1, in ?
  File
/usr/local/dc/zope/lib/python/Products/LoginManager/LoginManager.py,
line 9, in ?
ImportError: cannot import name SheetProviderContainer

help!

Thanks
Owen


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] [Zope]login manager error

2000-08-01 Thread Owen Smith

solved it by using LoginManager-0_8_7a1.tgz

Owen Smith wrote:

 on zope startup I get this

 zope@phonix:/usr/local/dc/zope$ --
 2000-08-01T13:39:45 ERROR(200) Zope Couldn't import
 Products.LoginManager
 Traceback (innermost last):
   File /usr/local/dc/zope/lib/python/OFS/Application.py, line 396, in
 import_products
 (Object: string)
   File /usr/local/dc/zope/lib/python/Products/LoginManager/__init__.py,
 line 1, in ?
   File
 /usr/local/dc/zope/lib/python/Products/LoginManager/LoginManager.py,
 line 9, in ?
 ImportError: cannot import name SheetProviderContainer




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Login manager and ZPatterns - error

2000-07-20 Thread Demos Economacos

I had an older version of LoginManager (0.3) installed
on my default Zope installation (2.1.6) running on a
RH 6.3 Linux. I downloaded and installed LoginManager
0.8.6 and then things started getting weird.
LoginManager and PTK were both being reported as
broken products. 

So, spent about 4 hours trying to understand what was
going on (reinstalling - reading the zope.org and
egroups) and then found out that I needed ZPatterns.
So I downloaded the binary version (0.3) and installed
that. However, when I tried to do the make part, I
kept getting an error. After much investigation, I
discoverd that I needed the Components library for the
makefile stuff. So,I then had to download the entire
Zope souce code and installed that into a new
directory - and copied the components over to the
existing zope directory. However the make still didnt
work. Then I tried (un)taring Zpatterns into the new
zope and tried to make and still problems. Tben I
downloaded the source an older version of ZPatterns
and installed that to the new zope and got the make to
work eventually. Then i tried the same procedure on
teh old zope and still no joy. Then I decided to copy
over everything from the new zope to the old zope in
the ZODB directory that was new. That seemed to do the
trick and enventually after about 16 straight hours of
pure frustration (for a newbie like me) i got the
makefile step to go through without an error. 

However, when I restart zope, I now get a new error in
the login manager traceback:
Traceback (innermost last):
  File
"/usr/share/zope/lib/python/OFS/Application.py", line
387, in import_products
product=__import__(pname, global_dict,
global_dict, silly)
  File
"/usr/share/zope/lib/python/Products/LoginManager/__init__.py",
line 1, in ?
import LoginManager, LoginMethods, UserSources
  File
"/usr/share/zope/lib/python/Products/LoginManager/LoginManager.py",
line 9, in ?
from Products.ZPatterns.SheetProviders import
SheetProviderContainer
ImportError: cannot import name SheetProviderContainer

I have no idea where to even start looking for the
problem. Anyone have any hint or idea - I would really
appreciate any help. Its been a very long and
frustrating day :)

Thanks in advance

Demos




__
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Login manager and ZPatterns - error

2000-07-20 Thread Mathias Bengtsson

What version of ZPatterns do you have. I experienced this problem
earlier and realized that in the file  SheetProviders.py in the
ZPatterns library some verison of ZPatterns totally lack the
SheetProverContainers. I run on ZPatterns 0-3-0 and I had it
up'n'running.

/Mathias Bengtsson

Demos Economacos wrote:

 I had an older version of LoginManager (0.3) installed
 on my default Zope installation (2.1.6) running on a
 RH 6.3 Linux. I downloaded and installed LoginManager
 0.8.6 and then things started getting weird.
 LoginManager and PTK were both being reported as
 broken products.

 So, spent about 4 hours trying to understand what was
 going on (reinstalling - reading the zope.org and
 egroups) and then found out that I needed ZPatterns.
 So I downloaded the binary version (0.3) and installed
 that. However, when I tried to do the make part, I
 kept getting an error. After much investigation, I
 discoverd that I needed the Components library for the
 makefile stuff. So,I then had to download the entire
 Zope souce code and installed that into a new
 directory - and copied the components over to the
 existing zope directory. However the make still didnt
 work. Then I tried (un)taring Zpatterns into the new
 zope and tried to make and still problems. Tben I
 downloaded the source an older version of ZPatterns
 and installed that to the new zope and got the make to
 work eventually. Then i tried the same procedure on
 teh old zope and still no joy. Then I decided to copy
 over everything from the new zope to the old zope in
 the ZODB directory that was new. That seemed to do the
 trick and enventually after about 16 straight hours of
 pure frustration (for a newbie like me) i got the
 makefile step to go through without an error.

 However, when I restart zope, I now get a new error in
 the login manager traceback:
 Traceback (innermost last):
   File
 "/usr/share/zope/lib/python/OFS/Application.py", line
 387, in import_products
 product=__import__(pname, global_dict,
 global_dict, silly)
   File
 "/usr/share/zope/lib/python/Products/LoginManager/__init__.py",
 line 1, in ?
 import LoginManager, LoginMethods, UserSources
   File
 "/usr/share/zope/lib/python/Products/LoginManager/LoginManager.py",
 line 9, in ?
 from Products.ZPatterns.SheetProviders import
 SheetProviderContainer
 ImportError: cannot import name SheetProviderContainer

 I have no idea where to even start looking for the
 problem. Anyone have any hint or idea - I would really
 appreciate any help. Its been a very long and
 frustrating day :)

 Thanks in advance

 Demos

 __
 Do You Yahoo!?
 Get Yahoo! Mail - Free email you can access from anywhere!
 http://mail.yahoo.com/

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )