Issue #316 resolved

latest release candidate seems a bit wonky - fails at import (2.1.rc1)

Anonymous created an issue

bash-3.00$ python Python 2.4 (#1, Jan 26 2005, 14:43:39) [GCC 3.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from cherrypy import cpg Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/cherrypy/init.py", line 67, in ? session = sessionfilter.SessionWrapper() AttributeError: 'module' object has no attribute 'SessionWrapper'

i did a normal "python setyp.py install"

Reported by mark pettit

Comments (7)

  1. Christian Wyglendowski

    You need to delete /path/to/site-packages/cherrypy/lib/filter/sessionfilter dir. I am assuming that you just installed 2.1-rc1 over the top of some older version. The session system has changed since the beta release, and is no longer a package dir. So delete that dir, and you should be set.

  2. Christian Wyglendowski

    A number of people have had issues with this error since the sessionfilter was changed. Should we include some code in setup.py to check for the existence of the cherrypy/lib/filter/sessionfilter dir and take some action (warn, remove dir, etc)? If there is a consensus, I would be willing to cook something up.

  3. Christian Wyglendowski

    Ok, I went ahead and made a patch for this. If someone with more experience could take a look at it before I commit it, I'd appreciate it.

    Here is sample output when setup.py detects the old sessionfilter dir:

    christian@wyglen:~/CherryPy-2.1.0-rc1$ python setup.py install --home=~/abigtestaroo
    ...
    running install
    running build
    running build_py
    running install_lib
    running install_data
    
    ************************ WARNING *****************************
     Since you have installed over the top of an existing CherryPy
     installation, you must remove the old sessionfilter package
     directory at:
     /home/christian/abigtestaroo/lib/python/cherrypy/lib/filter/sessionfilter
    ************************ WARNING *****************************
    
    

    I think that warning the user is a better approach than automatically deleting files from their system. If anyone has any suggestions for improvement, please let me know.

  4. Log in to comment