[Zope] Problems adding LocalFS again

Philipp Giere p.giere@hzd.hessen.de
Fri, 05 Apr 2002 10:56:00 +0200


Hello again!

Traceback was missing in the last mail . Used a wrong shortcut und the 
mail was sent.

I try to add an LocalFS Object with an python-product. My code looks 
like this:

from Products.LocalFS.LocalFS import manage_addLocalFS

def addLocalFS(self, id, title, basepath, username=None, password=None,
        REQUEST=None):
    manage_addLocalFS(self, id, title, basepath, username=None,
        password=None, REQUEST=None)

def manage_addUPortal(self,id,title,base_location,basepath, 
        RESPONSE=None): 

     ...

    # Add LocalFS
    addLocalFS(newObj.Linkliste, 'Bilder', 'Bilderordner auf lokalem
    Filesystem', basepath)

What is the error?

The error shown in Zope:
Error Type: AttributeError
Error Value: 'None' object has no attribute 'get'

The traceback:
Traceback (innermost last):
  File /opt/Zope-2.5.0-src/lib/python/ZPublisher/Publish.py, line 150,
in publish_module
  File /opt/Zope-2.5.0-src/lib/python/ZPublisher/Publish.py, line 114,
in publish
  File /opt/Zope-2.5.0-src/lib/python/Zope/__init__.py, line 158, in
zpublisher_exception_hook
  File /opt/Zope-2.5.0-src/lib/python/ZPublisher/Publish.py, line 98, in
publish
  File /opt/Zope-2.5.0-src/lib/python/ZPublisher/mapply.py, line 88, in
mapply
    (Object: manage_addUPortal)
  File /opt/Zope-2.5.0-src/lib/python/ZPublisher/Publish.py, line 39, in
call_object
    (Object: manage_addUPortal)
  File /opt/Zope-2.5.0-src/lib/python/Products/UPortal/UPortal.py, line
242, in manage_addUPortal
  File /opt/Zope-2.5.0-src/lib/python/Products/UPortal/UPortal.py, line
65, in addLocalFS
    (Object: Linkliste)
  File /opt/Zope-2.5.0-src/lib/python/Products/LocalFS/LocalFS.py, line
1255, in manage_addLocalFS
    (Object: Linkliste)
  File /opt/Zope-2.5.0-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 252, in __call__
    (Object: manage_main)
  File /opt/Zope-2.5.0-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 283, in _bindAndExec
    (Object: manage_main)
  File /opt/Zope-2.5.0-src/lib/python/App/special_dtml.py, line 172, in
_exec
    (Object: manage_main)
  File /opt/Zope-2.5.0-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 266, in __render_with_namespace__
    (Object: manage_page_header)
  File /opt/Zope-2.5.0-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 283, in _bindAndExec
    (Object: manage_page_header)
  File /opt/Zope-2.5.0-src/lib/python/App/special_dtml.py, line 172, in
_exec
    (Object: manage_page_header)
  File /opt/Zope-2.5.0-src/lib/python/DocumentTemplate/DT_Let.py, line
75, in render
    (Object: ag="REQUEST.get('HTTP_USER_AGENT', '')"
     is_nav4="ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0"
     use_css="REQUEST.get('zmi_use_css', '1')"
     zmi_embedded_css="1")
  File /opt/Zope-2.5.0-src/lib/python/DocumentTemplate/DT_Util.py, line
159, in eval
    (Object: REQUEST.get('HTTP_USER_AGENT', ''))
    (Info: REQUEST)
  File <string>, line 0, in ?
AttributeError: (see above)

Kind regards!

Philipp