PROBLEM with MOD_PYTHON

Discussion in 'Python' started by dan84, Oct 28, 2006.

  1. dan84

    dan84 Guest

    I don't understand this error , in the (Apache) errorlog I read this
    message :

    [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
    mod_python.apache.\n
    [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
    used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
    '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
    'C:\\\\Programmi\\\\Apache Group\\\\Apache2\\\\bin']".
    [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter
    callback found.
    [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler:
    Can't get/create interpreter.

    I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3
    I have read all the manuals, but I don't understand where I am wrong.

    thanks so much
    Marco.
    dan84, Oct 28, 2006
    #1
    1. Advertising

  2. dan84

    Chetan Guest

    "dan84" <> writes:
    > I don't understand this error , in the (Apache) errorlog I read this
    > message :
    >
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
    > mod_python.apache.\n
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
    > used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
    > '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
    > 'C:\\\\Programmi\\\\Apache Group\\\\Apache2\\\\bin']".
    > [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter
    > callback found.
    > [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler:
    > Can't get/create interpreter.
    >
    > I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3
    > I have read all the manuals, but I don't understand where I am wrong.
    >
    > thanks so much
    > Marco.

    Even if there is nothing Apache specific, doesn't it look odd that the
    path has 4 backslashes? Even accounting for half of those being added at the
    time of printing, it would appear that Apache is trying to use the path that
    contains two backslashes as path separator but there needs to be only one.

    Chetan
    Chetan, Oct 28, 2006
    #2
    1. Advertising

  3. dan84 wrote:
    > I don't understand this error , in the (Apache) errorlog I read this
    > message :
    >
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
    > mod_python.apache.\n
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
    > used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
    > '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
    > 'C:\\\\Programmi\\\\Apache Group\\\\Apache2\\\\bin']".


    The four backslashes look okay to me, since there are "s outside the
    list, viz:

    >>> mylist = [ r'C:\Python24' ]
    >>> mylist

    ['C:\\Python24']
    >>> repr(mylist)

    "['C:\\\\Python24']"


    Back to your question: Where is mod_python located? Is it anywhere in
    this path? Go to each directory/zip file, and see if you find
    mod_python. If so, is your base directory where you think it is? (use
    os.getcwd() to find out). If mod_python is still not in there, where is
    it? Now add THAT directory to your Python path.

    Cheers,
    Cliff
    J. Clifford Dyer, Oct 28, 2006
    #3
  4. dan84

    Guest

    dan> I don't understand this error , in the (Apache) errorlog I read
    dan> this message :

    dan> [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
    dan> mod_python.apache.\n
    dan> [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
    dan> used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
    dan> '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
    dan> 'C:\\\\Programmi\\\\Apache Group\\\\Apache2\\\\bin']".
    dan> [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter
    dan> callback found.
    dan> [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler:
    dan> Can't get/create interpreter.

    Just a wild ass guess, but maybe Apache can't find the necessary python dll
    to load?

    Skip
    , Oct 29, 2006
    #4
  5. dan84

    Guest

    dan84 wrote:
    > I don't understand this error , in the (Apache) errorlog I read this
    > message :
    >
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
    > mod_python.apache.\n
    > [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
    > used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
    > '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
    > 'C:\\\\Programmi\\\\Apache Group\\\\Apache2\\\\bin']".
    > [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter
    > callback found.
    > [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler:
    > Can't get/create interpreter.
    >
    > I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3
    > I have read all the manuals, but I don't understand where I am wrong.
    >
    > thanks so much
    > Marco.


    Read:


    http://www.modpython.org/pipermail/mod_python/2006-October/022362.html

    You may have to fiddle your Windows registry to add site-packages
    directory.

    BTW, there is a mailing list specifically for mod_python. You might be
    better off asking questions directly there, as we have seen most
    problems. You can also search the mailing list archives from the
    mod_python site.

    BTW, the quadruple backslashes is indeed because of the use of repr()
    when doing the error dump.

    Graham
    , Oct 29, 2006
    #5
  6. dan84

    Steve Holden Guest

    wrote:
    [...]
    > BTW, there is a mailing list specifically for mod_python. You might be
    > better off asking questions directly there, as we have seen most
    > problems. You can also search the mailing list archives from the
    > mod_python site.
    >
    > BTW, the quadruple backslashes is indeed because of the use of repr()
    > when doing the error dump.


    For gmane users the list is also available as newsgroup

    gmane.comp.python.mod_python

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://holdenweb.blogspot.com
    Recent Ramblings http://del.icio.us/steve.holden
    Steve Holden, Oct 29, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Medland

    Mod_python xml parsing problem

    Mike Medland, Jul 1, 2003, in forum: Python
    Replies:
    0
    Views:
    374
    Mike Medland
    Jul 1, 2003
  2. Doug Farrell

    Problem with mod_python and 4Suite

    Doug Farrell, Aug 8, 2003, in forum: Python
    Replies:
    2
    Views:
    333
    Doug Farrell
    Aug 12, 2003
  3. Gandalf

    mod_python problem

    Gandalf, May 6, 2004, in forum: Python
    Replies:
    3
    Views:
    1,499
    Gandalf
    May 7, 2004
  4. ws Wang
    Replies:
    2
    Views:
    486
    ws Wang
    Nov 30, 2004
  5. blbmdsmith
    Replies:
    1
    Views:
    633
    Graham Dumpleton
    Dec 14, 2006
Loading...

Share This Page