Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #316 (defect)

Opened 3 years ago

Last modified 3 years ago

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

Status: closed (fixed)

Reported by: mark pettit Assigned to: rdelon
Priority: normal Milestone: 2.1-rc2
Component: CherryPy code Keywords: import failure
Cc:

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"

Attachments

setup.py.patch (2.2 kB) - added by dowski on 09/24/05 01:13:52.

Change History

09/21/05 08:07:53: Modified by dowski

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.

09/22/05 20:29:02: Modified by dowski

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.

09/23/05 17:10:21: Modified by fumanchu

  • milestone changed from 2.1-rc1 to 2.1-rc2.

09/24/05 01:11:56: Modified by dowski

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.

09/24/05 01:13:52: Modified by dowski

  • attachment setup.py.patch added.

09/24/05 02:23:02: Modified by fumanchu

Could you prompt for deletion at that point (in addition to the warning)?

09/24/05 13:34:39: Modified by dowski

  • status changed from new to closed.
  • resolution set to fixed.

Implemented prompt for deletion. Fixed in changeset 676.

Hosted by WebFaction

Log in as guest/cpguest to create tickets