ImportError: No module named filter.basefilter

twiiqer tweaker avatartwiiqer tweaker created an issue

I am using the latest version of cherrypy (3.2.3) the one which is available in "Downloads" section. Now, I want to hv some filters now I am using :

from cherrypy.filters.basefilter import BaseFilter

also I tried old one, from cherrypy.lib.filter.basefilter import BaseFilter

But in both case I get error: ImportError: No module named filter.basefilter

Comments (6)

  1. Sylvain Hellegouarch

    Again, this is not the right place to ask those questions. Could you redirect them to the mailing list or stackoverflow?

    Mind you, I can answer anyway, you're trying to import modules that existed in CherryPy 2 but not in CherryPy 3 which is why it fails.

  2. twiiqer tweaker

    oh sorry you right, please accept my apologise, I will do it in stackoverflow...Because I am in a very sensitive state, this is a large project and I suggested my company to use cherrypy, coz I found it really simple and clean and fast, now I need this filter ASAP, but I don't know how, anyway I will ask this in stackoverflow...

  3. Sylvain Hellegouarch

    No problem. But You've downloaded CherryPy 3.x which has dropped filters (they've been somewhat improved by "tools"). So, if you are writing a software using "filters", you will have to downgrade to CherryPy 2 (which is neither maintained nor developed anymore).

  4. twiiqer tweaker

    No I have not used filter, actually I want to be able to extend request process, I mean I want to have events such as "before_request_body", as I know they should be done through filters, thats why I was looking for filter, so you means I can do these thing by filter? Is there any link? Sorry still I am asking question here :)

  5. twiiqer tweaker

    I don't how to say thank you, you save my time a lot, and saving the time of a programmer is the best of things in this world!! ... Just wait for some few weeks, what we are doing is a new social networks, and I am SUREEEE, it will be popular soon!! And we hv used your nice CherryPy with MongoDB....For sure we are going to show everyone you can be very light but in large scale thank you :)

  6. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.