jtoolkit-users Mailing List for jToolkit
Brought to you by:
davidfraser,
friedelwolff
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(9) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Greenbeard <gre...@ya...> - 2012-03-14 05:19:21
|
<a href="http://incaseyouhadntnoticedweareinaneconomiccrisishere.com/author/sebastian-deken/2009/01/bmrothf.html"> http://incaseyouhadntnoticedweareinaneconomiccrisishere.com/author/sebastian-deken/2009/01/bmrothf.html</a> |
From: Greenbeard <gre...@ya...> - 2012-03-06 05:02:20
|
<a href="http://mortalhalf.com/manga/wp-content/plugins/extended-comment-options/itpodn.html"> http://mortalhalf.com/manga/wp-content/plugins/extended-comment-options/itpodn.html</a> |
From: Greenbeard <gre...@ya...> - 2012-02-23 04:16:46
|
http://virtualobscura.com/wp-content/plugins/extended-comment-options/tpfmgl.html |
From: Greenbeard <gre...@ya...> - 2012-02-23 01:55:27
|
http://braceyourselfla.com/wp-admin/tpfmgl.html |
From: Greenbeard <gre...@ya...> - 2012-02-22 23:03:17
|
http://hotelaguasdocampo.com.br/adm/adm.galeria/images/galerias/7p86u74o8u/eyjtpq.html |
From: Greenbeard <gre...@ya...> - 2012-02-22 18:17:00
|
http://edglazer.com/wp-content/plugins/extended-comment-options/rgffk.html |
From: Greenbeard <gre...@ya...> - 2012-02-22 15:22:51
|
http://mutthead.net/wp-content/plugins/extended-comment-options/eyjtpq.html |
From: David F. <da...@sj...> - 2006-12-04 08:48:16
|
Armin Besirovic wrote: > Hey there. > > I've tried installing jToolkit on a Debian box with python v2.3.5-2 but I get > messages for this file: > > /usr/lib/python2.3/site-packages/jToolkit/test/test_application.py > > saying something about a syntax error. I've also found a debian package > called 'python-jtoolkit-0.7.8-2' which requires 'python2.3.5-6' but I'm not > in the position where I can install a new version of python, so is there a > workaround? > > Also, the package 'python-support' required by 'python-jtoolkit' requires the > new version of python. > > Thanks much. > I'm not sure if the folks who packaged jToolkit for Debian are on this list - they're probably on the Pootle list (tra...@li...) and it may be best to contact them there. The syntax error is because of a Python 2.4-style decorator if I remember correctly - that file is only used for tests and could be removed if you need a quick fix But it sounds to me (not being a Debianite) like if the version requires a new release of Python there may be a reason for this... or else you may be able to dig up an old version of python-support Cheers David |
From: David F. <da...@sj...> - 2003-10-16 04:56:49
|
Greenbeard wrote: >Well I figured it out......Here is my log > >Removed ALL jtoolkit references >Downloaded the tar.gz this time >used winzip to place tar.gz file to >python\Lib\site-packages >renamed folder from jtoolkit-0.1 to jtoolkit >Restored httpd.conf as shown on webpage >created a folder called jtoolkit in my apache\htdocs >renamed __init__.py in \web to orig_init_.py >copied in the newer __init__.py I received from you >the other day >Restarted APACHE > > >ERROR> >Mod_python error: "PythonHandler jToolkit.web" > >Traceback (most recent call last): > > File "C:\Python22\Lib\mod_python\apache.py", line >335, in HandlerDispatch > result = object(req) > > File >"C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", >line 93, in handler > server = getserver(modulename, instancename) > > File >"C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", >line 71, in getserver > raise ImportError(errormessage) > >ImportError: Error importing module >'jToolkit.demo.helloworld': No module named DateTime >Python path is ['C:/Program Files/Apache >Group/Apache2/htdocs/jtoolkit/\\', 'C:/Program >Files/Apache Group/Apache2/htdocs/\\', >'C:\\Python22\\Lib\\site-packages\\Pythonwin', >'C:\\Python22\\Lib\\site-packages\\win32', >'C:\\Python22\\Lib\\site-packages\\win32\\lib', >'C:\\Python22\\Lib\\site-packages', >'C:\\Python22\\Lib', 'C:\\Python22\\DLLs', >'C:\\Python22\\Lib\\lib-tk', 'C:\\Program >Files\\Apache Group\\Apache2', 'C:\\Program >Files\\Apache Group\\Apache2\\bin', 'C:\\Python22'] > >============================================ >Ah HA! My mx.DateTime is under >c:\python22\Lib\site-packages\mx\DateTime - As is the >default when you install the mx base package on >Windos. So I copied the DateTime folder from the mx >package to the Site-Packages directory and BINGO > >Hello World > > > >Now I do not know why I did not get this error before >but it was definately user error I'm sure. Now we >will see what else I can figure out! > >Thanks for your help, I am sure I will be in touch ;-> > > >gb400 > > Thanks for the detailed feedback. I will look at addressing some of the issues you found in the next release... Let the list know if you need any more help as the docs from here on are very scarce! BTW, were you just trying jToolkit out or did you have a specific app in mind? Thanks David |
From: Greenbeard <gre...@ya...> - 2003-10-16 04:22:26
|
Well I figured it out......Here is my log Removed ALL jtoolkit references Downloaded the tar.gz this time used winzip to place tar.gz file to python\Lib\site-packages renamed folder from jtoolkit-0.1 to jtoolkit Restored httpd.conf as shown on webpage created a folder called jtoolkit in my apache\htdocs renamed __init__.py in \web to orig_init_.py copied in the newer __init__.py I received from you the other day Restarted APACHE ERROR> Mod_python error: "PythonHandler jToolkit.web" Traceback (most recent call last): File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch result = object(req) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 93, in handler server = getserver(modulename, instancename) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 71, in getserver raise ImportError(errormessage) ImportError: Error importing module 'jToolkit.demo.helloworld': No module named DateTime Python path is ['C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit/\\', 'C:/Program Files/Apache Group/Apache2/htdocs/\\', 'C:\\Python22\\Lib\\site-packages\\Pythonwin', 'C:\\Python22\\Lib\\site-packages\\win32', 'C:\\Python22\\Lib\\site-packages\\win32\\lib', 'C:\\Python22\\Lib\\site-packages', 'C:\\Python22\\Lib', 'C:\\Python22\\DLLs', 'C:\\Python22\\Lib\\lib-tk', 'C:\\Program Files\\Apache Group\\Apache2', 'C:\\Program Files\\Apache Group\\Apache2\\bin', 'C:\\Python22'] ============================================ Ah HA! My mx.DateTime is under c:\python22\Lib\site-packages\mx\DateTime - As is the default when you install the mx base package on Windos. So I copied the DateTime folder from the mx package to the Site-Packages directory and BINGO Hello World Now I do not know why I did not get this error before but it was definately user error I'm sure. Now we will see what else I can figure out! Thanks for your help, I am sure I will be in touch ;-> gb400 --- David Fraser <da...@sj...> wrote: > Greenbeard wrote: > > >OK, > >I replaced the __init__.py and now when Apache > >Restarts I get: > >--------------------------- > >Mod_python error: "PythonHandler jToolkit.web" > > > >Traceback (most recent call last): > > > > File "C:\Python22\Lib\mod_python\apache.py", line > 335, in HandlerDispatch > > result = object(req) > > > > File > "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > line 93, in handler > > server = getserver(modulename, instancename) > > > > File > "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > line 67, in getserver > > module = __import__(modulename, globals(), > locals(), [instancename]) > > > > File "C:/Program Files/Apache > Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", > line 24, in ? > > class HelloWorldServer(server.AppServer): > > > > File "C:/Program Files/Apache > Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", > line 26, in HelloWorldServer > > serverclass = HelloWorldServer > > > >NameError: name 'HelloWorldServer' is not defined > >======================== > > > > > This is the real problem, I'll explain below about > the other stuff... > Basically it looks like your helloworld.py is > corrupted. > the line "serverclass = HelloWorldServer" should be > line 32, it seems > lines 26-31 have been deleted... > I have attached the correct version as it's small, > can you confirm that > you are using this exact file... > > >However, If I refresh the page I get > > > >Mod_python error: "PythonHandler jToolkit.web" > > > >Traceback (most recent call last): > > > > File "C:\Python22\Lib\mod_python\apache.py", line > 335, in HandlerDispatch > > result = object(req) > > > > File > "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > line 93, in handler > > server = getserver(modulename, instancename) > > > > File > "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > line 78, in getserver > > raise AttributeError(errormessage) > > > >AttributeError: module 'demo.helloworld' has no > attribute 'HelloWorldConfig' > >module is <module 'demo.helloworld' from > 'C:/Program Files/Apache > Group/Apache2/htdocs/jtoolkit/\demo\helloworld.pyc'>, > >attributes are ['__builtins__', '__doc__', > '__file__', '__name__', 'server', 'widgets'] > >Python path is ['C:/Program Files/Apache > Group/Apache2/htdocs/jtoolkit/\\', 'C:/Program > Files/Apache Group/Apache2/htdocs/\\', > 'C:\\Python22\\Lib\\site-packages\\Pythonwin', > 'C:\\Python22\\Lib\\site-packages\\win32', > 'C:\\Python22\\Lib\\site-packages\\win32\\lib', > 'C:\\Python22\\Lib\\site-packages', > 'C:\\Python22\\Lib', 'C:\\Python22\\DLLs', > 'C:\\Python22\\Lib\\lib-tk', 'C:\\Program > Files\\Apache Group\\Apache2', 'C:\\Program > Files\\Apache Group\\Apache2\\bin', 'C:\\Python22'] > >======= > > > > > OK, the problem here is that once the initial import > error has occured > (above), > mod_python thinks the module has already been > imported, so doesn't > re-import it. > But because it hasn't been imported correctly, it > doesn't have the right > attributes... > > >Ok, well I had to tweak the httpd.conf to get this > far > >look like > ><Directory "C:\\Program Files\\Apache > Group\\Apache2\\htdocs\\jtoolkit"> > > SetHandler python-program > > PythonHandler jToolkit.web > > #PythonOption jToolkit.module > jtoolkit.demo.helloworld > > PythonOption jToolkit.module demo.helloworld > > PythonOption jToolkit.instance HelloWorldConfig > > PythonDebug On > > > ></Directory> > > > > > Right, so you've set it up so you don't need the > jToolkit prefix... > BTW I would usually set this up so jToolkit is in > the Python path itself > rather than under Apache htdocs, but that's not the > source of the error > here (you should be able to get it to work like > this) > > >So, I went interactive on this and here is what I > got: > > > > > >>>>from demo import helloworld > >>>> > >>>> > >Traceback (most recent call last): > > File "<interactive input>", line 1, in ? > > File > "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", > line 24, in ? > > class HelloWorldServer(server.AppServer): > > File > "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", > line 26, in HelloWorldServer > > serverclass = HelloWorldServer > >NameError: name 'HelloWorldServer' is not defined > > > > > Again, this shows that the error is in > demo.helloworld > > >>>>import demo > >>>>dir(demo) > >>>> > >>>> > >['__all__', '__builtins__', '__doc__', '__file__', > '__name__', '__path__', 'helloworld'] > > > > > >>>>from demo import helloworld > >>>>dir(helloworld) > >>>> > >>>> > >['__builtins__', '__doc__', '__file__', '__name__', > 'server', 'widgets'] > > > > > > > >So I think I must have something configured > >incorrectly in either my httpd.conf or PYTHONPATH. > >Could it be my python version? > > > > > No, as I said above, your copy of helloworld.py > seems wrong which is > strange. > > >Perhaps I should just start over. Let me know if > you > >have any ideas. I hate to waste your time. > > > > > Not a waste of time at all, it's good to have the > feedback. > > >I have access to an openBSD server that I may try > >installing this on. My problem there is that I > >usually have to set the python path in the > >application. (or I just dont know how to set it on > >openBSD yet. ) > > > > > The best way I find is either to install jToolkit so > it is in the Python > Path already (if you have appropriate rights) > or you can set PythonPath from the .htaccess file > (see the modpython docs) > > Let me know what happens with this... > > David > > > > >--- David Fraser <da...@sj...> wrote: > > > > > >>Greenbeard wrote: > >> > >> > >> > >>>Hello there > >>> > >>>I am running Win2k, Python 2.2, on Apache2 , > mod_py 3.0.1 > >>> > >>>I extracted the archive to site-packages and > changed > >>> > >>> > >>>the httpd.conf as shown in your homepage. I get: > >>>----------------------------------------------- > >>>Mod_python error: "PythonHandler jToolkit.web" > >>> > >>>Traceback (most recent call last): > >>> > >>> File "C:\Python22\Lib\mod_python\apache.py", > line 335, in HandlerDispatch > >>> result = object(req) > >>> > >>> File > "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > >>> > >>> > >>>line 72, in handler > >>> instance = getattr(module, instancename) > >>> > >>>AttributeError: 'module' object has no attribute > 'HelloWorldConfig' > >>> > >>>----------------------------------------------- > >>>Here is httpd.conf > >>> > >>><Directory "C:/Program Files/Apache > Group/Apache2/htdocs/jtoolkit"> > >>>SetHandler python-program > >>>PythonHandler jToolkit.web > >>>PythonOption jToolkit.module > jToolkit.demo.helloworld > >>> > >>> > >>>PythonOption jToolkit.instance HelloWorldConfig > >>>PythonDebug On > >>> > >>></Directory> > >>> > >>> > >>>TIA, > >>> > >>>gb400 > >>> > >>> > >>> > >>> > >>Hi > >> > >>Thanks for reporting this, this shouldn't happen, > but hopefully we'll be > >>able to track it down... > >>I have attached a modified version of > jToolkit\web\__init__.py (this is > >>now in jToolkit CVS). > >>You should be able to save it over the __init__.py > in > >> > >>C:\Python22\Lib\site-packages\jToolkit\web\__init__.py > >> > >> > >>This should give you a more detailed error message > saying which > >>attributes are present in the imported module: > >> > >>Mod_python error: "PythonHandler jToolkit.web" > >> > >>Traceback (most recent call last): > >> > >> File > "usr/local/python22nothreads/lib/python2.2/site-packages/mod_python/apache.py", > line 193, in Dispatch > >> result = object(req) > >> > >> File > "share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", > line 84, in handler > >> server = getserver(modulename, instancename) > >> > >> File > "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", > line 69, in getserver > >> raise AttributeError("module %r has no > attribute %r\nmodule is %r, attributes are %r" % > (modulename, instancename, module, dir(module))) > >> > >>AttributeError: module 'jToolkit.demo.helloworld' > has no attribute 'HelloWorldConfIg' > >>module is <module 'jToolkit.demo.helloworld' from > '/share/sjsoft/code/jSuite.py/jToolkit/demo/helloworld.pyc'>, > >>attributes are ['HelloWorldConfig', > 'HelloWorldServer', '__builtins__', '__doc__', > '__file__', '__name__', 'server', 'widgets'] > >>Python path is ['/share/sjsoft/code/jSuite.py/', > '/usr/local/python22nothreads/lib/python2.2/', > '/usr/local/python22nothreads/lib/python2.2/site-packages'] > >> > >>Something else that might be helpful is to try the > following from python: > >>from jToolkit.demo import helloworld > >>dir(helloworld) > >>print helloworld.HelloWorldConfig > >> > >>Let me know the results you find! Thanks for > helping to test the package > >> > >>Regards > >>David > >> > >>PS Soon jToolkit should have the ability to run in > a standalone mode > >>without mod_python or Apache, which should make > testing and initial > >>setup easier > >> > >> > >> > > > """this is a Hello World-style demonstration program > of jToolkit""" > > from jToolkit.web import server > from jToolkit.widgets import widgets > > # Copyright 2002, 2003 St James Software > # > # This file is part of jToolkit. > # > # jToolkit is free software; you can redistribute it > and/or modify > # it under the terms of the GNU General Public > License as published by > # the Free Software Foundation; either version 2 of > the License, or > # (at your option) any later version. > # > # jToolkit is distributed in the hope that it will > be useful, > # but WITHOUT ANY WARRANTY; without even the implied > warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General > Public License > # along with jToolkit; if not, write to the Free > Software > # Foundation, Inc., 59 Temple Place, Suite 330, > Boston, MA 02111-1307 USA > > class HelloWorldServer(server.AppServer): > """the Server that serves the Hello World Pages""" > def getpage(self, pathwords, session, argdict): > """return a page that will be sent to the > user""" > return widgets.PlainContents("Hello World") > > class HelloWorldConfig: > """the configuration parameters for a hello world > server""" > serverclass = HelloWorldServer > > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: David F. <da...@sj...> - 2003-10-15 06:16:16
|
Greenbeard wrote: >OK, >I replaced the __init__.py and now when Apache >Restarts I get: >--------------------------- >Mod_python error: "PythonHandler jToolkit.web" > >Traceback (most recent call last): > > File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch > result = object(req) > > File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 93, in handler > server = getserver(modulename, instancename) > > File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 67, in getserver > module = __import__(modulename, globals(), locals(), [instancename]) > > File "C:/Program Files/Apache Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", line 24, in ? > class HelloWorldServer(server.AppServer): > > File "C:/Program Files/Apache Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", line 26, in HelloWorldServer > serverclass = HelloWorldServer > >NameError: name 'HelloWorldServer' is not defined >======================== > > This is the real problem, I'll explain below about the other stuff... Basically it looks like your helloworld.py is corrupted. the line "serverclass = HelloWorldServer" should be line 32, it seems lines 26-31 have been deleted... I have attached the correct version as it's small, can you confirm that you are using this exact file... >However, If I refresh the page I get > >Mod_python error: "PythonHandler jToolkit.web" > >Traceback (most recent call last): > > File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch > result = object(req) > > File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 93, in handler > server = getserver(modulename, instancename) > > File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 78, in getserver > raise AttributeError(errormessage) > >AttributeError: module 'demo.helloworld' has no attribute 'HelloWorldConfig' >module is <module 'demo.helloworld' from 'C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit/\demo\helloworld.pyc'>, >attributes are ['__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] >Python path is ['C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit/\\', 'C:/Program Files/Apache Group/Apache2/htdocs/\\', 'C:\\Python22\\Lib\\site-packages\\Pythonwin', 'C:\\Python22\\Lib\\site-packages\\win32', 'C:\\Python22\\Lib\\site-packages\\win32\\lib', 'C:\\Python22\\Lib\\site-packages', 'C:\\Python22\\Lib', 'C:\\Python22\\DLLs', 'C:\\Python22\\Lib\\lib-tk', 'C:\\Program Files\\Apache Group\\Apache2', 'C:\\Program Files\\Apache Group\\Apache2\\bin', 'C:\\Python22'] >======= > > OK, the problem here is that once the initial import error has occured (above), mod_python thinks the module has already been imported, so doesn't re-import it. But because it hasn't been imported correctly, it doesn't have the right attributes... >Ok, well I had to tweak the httpd.conf to get this far >look like ><Directory "C:\\Program Files\\Apache Group\\Apache2\\htdocs\\jtoolkit"> > SetHandler python-program > PythonHandler jToolkit.web > #PythonOption jToolkit.module jtoolkit.demo.helloworld > PythonOption jToolkit.module demo.helloworld > PythonOption jToolkit.instance HelloWorldConfig > PythonDebug On > ></Directory> > > Right, so you've set it up so you don't need the jToolkit prefix... BTW I would usually set this up so jToolkit is in the Python path itself rather than under Apache htdocs, but that's not the source of the error here (you should be able to get it to work like this) >So, I went interactive on this and here is what I got: > > >>>>from demo import helloworld >>>> >>>> >Traceback (most recent call last): > File "<interactive input>", line 1, in ? > File "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", line 24, in ? > class HelloWorldServer(server.AppServer): > File "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", line 26, in HelloWorldServer > serverclass = HelloWorldServer >NameError: name 'HelloWorldServer' is not defined > > Again, this shows that the error is in demo.helloworld >>>>import demo >>>>dir(demo) >>>> >>>> >['__all__', '__builtins__', '__doc__', '__file__', '__name__', '__path__', 'helloworld'] > > >>>>from demo import helloworld >>>>dir(helloworld) >>>> >>>> >['__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] > > > >So I think I must have something configured >incorrectly in either my httpd.conf or PYTHONPATH. >Could it be my python version? > > No, as I said above, your copy of helloworld.py seems wrong which is strange. >Perhaps I should just start over. Let me know if you >have any ideas. I hate to waste your time. > > Not a waste of time at all, it's good to have the feedback. >I have access to an openBSD server that I may try >installing this on. My problem there is that I >usually have to set the python path in the >application. (or I just dont know how to set it on >openBSD yet. ) > > The best way I find is either to install jToolkit so it is in the Python Path already (if you have appropriate rights) or you can set PythonPath from the .htaccess file (see the modpython docs) Let me know what happens with this... David > >--- David Fraser <da...@sj...> wrote: > > >>Greenbeard wrote: >> >> >> >>>Hello there >>> >>>I am running Win2k, Python 2.2, on Apache2 , mod_py 3.0.1 >>> >>>I extracted the archive to site-packages and changed >>> >>> >>>the httpd.conf as shown in your homepage. I get: >>>----------------------------------------------- >>>Mod_python error: "PythonHandler jToolkit.web" >>> >>>Traceback (most recent call last): >>> >>> File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch >>> result = object(req) >>> >>> File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", >>> >>> >>>line 72, in handler >>> instance = getattr(module, instancename) >>> >>>AttributeError: 'module' object has no attribute 'HelloWorldConfig' >>> >>>----------------------------------------------- >>>Here is httpd.conf >>> >>><Directory "C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit"> >>>SetHandler python-program >>>PythonHandler jToolkit.web >>>PythonOption jToolkit.module jToolkit.demo.helloworld >>> >>> >>>PythonOption jToolkit.instance HelloWorldConfig >>>PythonDebug On >>> >>></Directory> >>> >>> >>>TIA, >>> >>>gb400 >>> >>> >>> >>> >>Hi >> >>Thanks for reporting this, this shouldn't happen, but hopefully we'll be >>able to track it down... >>I have attached a modified version of jToolkit\web\__init__.py (this is >>now in jToolkit CVS). >>You should be able to save it over the __init__.py in >> >>C:\Python22\Lib\site-packages\jToolkit\web\__init__.py >> >> >>This should give you a more detailed error message saying which >>attributes are present in the imported module: >> >>Mod_python error: "PythonHandler jToolkit.web" >> >>Traceback (most recent call last): >> >> File "usr/local/python22nothreads/lib/python2.2/site-packages/mod_python/apache.py", line 193, in Dispatch >> result = object(req) >> >> File "share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", line 84, in handler >> server = getserver(modulename, instancename) >> >> File "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", line 69, in getserver >> raise AttributeError("module %r has no attribute %r\nmodule is %r, attributes are %r" % (modulename, instancename, module, dir(module))) >> >>AttributeError: module 'jToolkit.demo.helloworld' has no attribute 'HelloWorldConfIg' >>module is <module 'jToolkit.demo.helloworld' from '/share/sjsoft/code/jSuite.py/jToolkit/demo/helloworld.pyc'>, >>attributes are ['HelloWorldConfig', 'HelloWorldServer', '__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] >>Python path is ['/share/sjsoft/code/jSuite.py/', '/usr/local/python22nothreads/lib/python2.2/', '/usr/local/python22nothreads/lib/python2.2/site-packages'] >> >>Something else that might be helpful is to try the following from python: >>from jToolkit.demo import helloworld >>dir(helloworld) >>print helloworld.HelloWorldConfig >> >>Let me know the results you find! Thanks for helping to test the package >> >>Regards >>David >> >>PS Soon jToolkit should have the ability to run in a standalone mode >>without mod_python or Apache, which should make testing and initial >>setup easier >> >> >> |
From: Greenbeard <gre...@ya...> - 2003-10-15 04:01:12
|
OK, I replaced the __init__.py and now when Apache Restarts I get: --------------------------- Mod_python error: "PythonHandler jToolkit.web" Traceback (most recent call last): File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch result = object(req) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 93, in handler server = getserver(modulename, instancename) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 67, in getserver module = __import__(modulename, globals(), locals(), [instancename]) File "C:/Program Files/Apache Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", line 24, in ? class HelloWorldServer(server.AppServer): File "C:/Program Files/Apache Group/Apache2/htdocs/\jtoolkit\demo\helloworld.py", line 26, in HelloWorldServer serverclass = HelloWorldServer NameError: name 'HelloWorldServer' is not defined ======================== However, If I refresh the page I get Mod_python error: "PythonHandler jToolkit.web" Traceback (most recent call last): File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch result = object(req) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 93, in handler server = getserver(modulename, instancename) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 78, in getserver raise AttributeError(errormessage) AttributeError: module 'demo.helloworld' has no attribute 'HelloWorldConfig' module is <module 'demo.helloworld' from 'C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit/\demo\helloworld.pyc'>, attributes are ['__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] Python path is ['C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit/\\', 'C:/Program Files/Apache Group/Apache2/htdocs/\\', 'C:\\Python22\\Lib\\site-packages\\Pythonwin', 'C:\\Python22\\Lib\\site-packages\\win32', 'C:\\Python22\\Lib\\site-packages\\win32\\lib', 'C:\\Python22\\Lib\\site-packages', 'C:\\Python22\\Lib', 'C:\\Python22\\DLLs', 'C:\\Python22\\Lib\\lib-tk', 'C:\\Program Files\\Apache Group\\Apache2', 'C:\\Program Files\\Apache Group\\Apache2\\bin', 'C:\\Python22'] ======= Ok, well I had to tweak the httpd.conf to get this far look like <Directory "C:\\Program Files\\Apache Group\\Apache2\\htdocs\\jtoolkit"> SetHandler python-program PythonHandler jToolkit.web #PythonOption jToolkit.module jtoolkit.demo.helloworld PythonOption jToolkit.module demo.helloworld PythonOption jToolkit.instance HelloWorldConfig PythonDebug On </Directory> So, I went interactive on this and here is what I got: >>> from demo import helloworld Traceback (most recent call last): File "<interactive input>", line 1, in ? File "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", line 24, in ? class HelloWorldServer(server.AppServer): File "C:\PYTHON22\LIB\SITE-PACKAGES\JTOOLKIT\demo\helloworld.py", line 26, in HelloWorldServer serverclass = HelloWorldServer NameError: name 'HelloWorldServer' is not defined >>> import demo >>> dir(demo) ['__all__', '__builtins__', '__doc__', '__file__', '__name__', '__path__', 'helloworld'] >>> from demo import helloworld >>> dir(helloworld) ['__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] >>> So I think I must have something configured incorrectly in either my httpd.conf or PYTHONPATH. Could it be my python version? Perhaps I should just start over. Let me know if you have any ideas. I hate to waste your time. I have access to an openBSD server that I may try installing this on. My problem there is that I usually have to set the python path in the application. (or I just dont know how to set it on openBSD yet. ) --- David Fraser <da...@sj...> wrote: > Greenbeard wrote: > > >Hello there > > > >I am running Win2k, Python 2.2, on Apache2 , mod_py > >3.0.1 > > > >I extracted the archive to site-packages and > changed > >the httpd.conf as shown in your homepage. I get: > >----------------------------------------------- > >Mod_python error: "PythonHandler jToolkit.web" > > > >Traceback (most recent call last): > > > > File "C:\Python22\Lib\mod_python\apache.py", line > >335, in HandlerDispatch > > result = object(req) > > > > File > >"C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", > >line 72, in handler > > instance = getattr(module, instancename) > > > >AttributeError: 'module' object has no attribute > >'HelloWorldConfig' > > > >----------------------------------------------- > >Here is httpd.conf > > > > <Directory "C:/Program Files/Apache > >Group/Apache2/htdocs/jtoolkit"> > >SetHandler python-program > >PythonHandler jToolkit.web > >PythonOption jToolkit.module > jToolkit.demo.helloworld > >PythonOption jToolkit.instance HelloWorldConfig > >PythonDebug On > > > ></Directory> > > > > > >TIA, > > > >gb400 > > > > > Hi > > Thanks for reporting this, this shouldn't happen, > but hopefully we'll be > able to track it down... > I have attached a modified version of > jToolkit\web\__init__.py (this is > now in jToolkit CVS). > You should be able to save it over the __init__.py > in > C:\Python22\Lib\site-packages\jToolkit\web\__init__.py > > This should give you a more detailed error message > saying which > attributes are present in the imported module: > > Mod_python error: "PythonHandler jToolkit.web" > > Traceback (most recent call last): > > File > "/usr/local/python22nothreads/lib/python2.2/site-packages/mod_python/apache.py", > line 193, in Dispatch > result = object(req) > > File > "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", > line 84, in handler > server = getserver(modulename, instancename) > > File > "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", > line 69, in getserver > raise AttributeError("module %r has no attribute > %r\nmodule is %r, attributes are %r" % (modulename, > instancename, module, dir(module))) > > AttributeError: module 'jToolkit.demo.helloworld' > has no attribute 'HelloWorldConfIg' > module is <module 'jToolkit.demo.helloworld' from > '/share/sjsoft/code/jSuite.py/jToolkit/demo/helloworld.pyc'>, > attributes are ['HelloWorldConfig', > 'HelloWorldServer', '__builtins__', '__doc__', > '__file__', '__name__', 'server', 'widgets'] > Python path is ['/share/sjsoft/code/jSuite.py/', > '/usr/local/python22nothreads/lib/python2.2/', > '/usr/local/python22nothreads/lib/python2.2/site-packages'] > > Something else that might be helpful is to try the > following from python: > from jToolkit.demo import helloworld > dir(helloworld) > print helloworld.HelloWorldConfig > > Let me know the results you find! Thanks for helping > to test the package > > Regards > David > > PS Soon jToolkit should have the ability to run in a > standalone mode > without mod_python or Apache, which should make > testing and initial > setup easier > > > """jToolkit.web package index and master handler > function for mod_python""" > > # Copyright 2002, 2003 St James Software > # > # This file is part of jToolkit. > # > # jToolkit is free software; you can redistribute it > and/or modify > # it under the terms of the GNU General Public > License as published by > # the Free Software Foundation; either version 2 of > the License, or > # (at your option) any later version. > # > # jToolkit is distributed in the hope that it will > be useful, > # but WITHOUT ANY WARRANTY; without even the implied > warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General > Public License > # along with jToolkit; if not, write to the Free > Software > # Foundation, Inc., 59 Temple Place, Suite 330, > Boston, MA 02111-1307 USA > > import sys > > # list of modules in this package > __all__ = ["safeapache", "server", "session"] > > # the global list of application servers, used to > remember the server based on the fullinstancename > # one server per instance defined in the > configuration > servers = {} > > logtimes = 0 > > if logtimes: > import os, time > try: > import thread > except ImportError: > # pretend we have threads if we don't > def thread_get_ident(): > return 0 > class blank: pass > thread = blank() > thread.get_ident = thread_get_ident > logfilename = '/tmp/threads.log' > > def logtime(message): > osid = os.getpid() > threadid = thread.get_ident() > t = time.time() > ms = int((t - int(t))*1000.0) > timestr = time.strftime('%Y-%m-%d %H:%M:%S') + > '.%03d' % ms > f = open(logfilename, 'a') > f.write('%s: pid %r tid %r: %s\n' % (timestr, > osid, threadid, message)) > f.close() > else: > def logtime(message): > """don't log anything as we aren't in logtimes > mode""" > pass > > def getserver(modulename, instancename): > """returns a server based on a given instance in a > given module""" > fullinstancename = modulename + "." + instancename > if fullinstancename in servers: > server = servers[fullinstancename] > else: > # this is equivalent to: from modulename import > instancename > try: > module = __import__(modulename, globals(), > locals(), [instancename]) > except ImportError, importmessage: > errormessage = "Error importing module %r: > %s\nPython path is %r" \ > % (modulename, importmessage, > sys.path) > raise ImportError(errormessage) > # get the actual instance > try: > instance = getattr(module, instancename) > except AttributeError: > errormessage = "module %r has no attribute > %r\nmodule is %r, attributes are %r\nPython path is > %r" \ > % (modulename, instancename, > module, dir(module), sys.path) > raise AttributeError(errormessage) > # construct a server of the appropriate class > using the instance > server = instance.serverclass(instance) > server.name = fullinstancename > servers[fullinstancename] = server > return server > > # handler is in here so that we can say > PythonHandler jToolkit.web > # (modpython automatically looks for handler in that > module) > def handler(req): > """the standard handler which locates the > instance, creates the server if neccessary, and > hands off to it""" > logtime('handler start: ' + req.uri) > apache_options = req.get_options() > modulename = apache_options['jToolkit.module'] > instancename = apache_options['jToolkit.instance'] > server = getserver(modulename, instancename) > pathwords = filter(None, req.uri.split('/')) # > split into bits, strip out empty strings > logtime('calling server.handle: ' + req.uri) > thepage = server.handle(req, pathwords) > logtime('calling server.sendpage: ' + req.uri) > result = server.sendpage(req, thepage) > logtime('done: ' + req.uri) > return result > > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: David F. <da...@sj...> - 2003-10-14 08:27:09
|
Greenbeard wrote: >Hello there > >I am running Win2k, Python 2.2, on Apache2 , mod_py >3.0.1 > >I extracted the archive to site-packages and changed >the httpd.conf as shown in your homepage. I get: >----------------------------------------------- >Mod_python error: "PythonHandler jToolkit.web" > >Traceback (most recent call last): > > File "C:\Python22\Lib\mod_python\apache.py", line >335, in HandlerDispatch > result = object(req) > > File >"C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", >line 72, in handler > instance = getattr(module, instancename) > >AttributeError: 'module' object has no attribute >'HelloWorldConfig' > >----------------------------------------------- >Here is httpd.conf > > <Directory "C:/Program Files/Apache >Group/Apache2/htdocs/jtoolkit"> >SetHandler python-program >PythonHandler jToolkit.web >PythonOption jToolkit.module jToolkit.demo.helloworld >PythonOption jToolkit.instance HelloWorldConfig >PythonDebug On > ></Directory> > > >TIA, > >gb400 > > Hi Thanks for reporting this, this shouldn't happen, but hopefully we'll be able to track it down... I have attached a modified version of jToolkit\web\__init__.py (this is now in jToolkit CVS). You should be able to save it over the __init__.py in C:\Python22\Lib\site-packages\jToolkit\web\__init__.py This should give you a more detailed error message saying which attributes are present in the imported module: Mod_python error: "PythonHandler jToolkit.web" Traceback (most recent call last): File "/usr/local/python22nothreads/lib/python2.2/site-packages/mod_python/apache.py", line 193, in Dispatch result = object(req) File "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", line 84, in handler server = getserver(modulename, instancename) File "/share/sjsoft/code/jSuite.py/jToolkit/web/__init__.py", line 69, in getserver raise AttributeError("module %r has no attribute %r\nmodule is %r, attributes are %r" % (modulename, instancename, module, dir(module))) AttributeError: module 'jToolkit.demo.helloworld' has no attribute 'HelloWorldConfIg' module is <module 'jToolkit.demo.helloworld' from '/share/sjsoft/code/jSuite.py/jToolkit/demo/helloworld.pyc'>, attributes are ['HelloWorldConfig', 'HelloWorldServer', '__builtins__', '__doc__', '__file__', '__name__', 'server', 'widgets'] Python path is ['/share/sjsoft/code/jSuite.py/', '/usr/local/python22nothreads/lib/python2.2/', '/usr/local/python22nothreads/lib/python2.2/site-packages'] Something else that might be helpful is to try the following from python: from jToolkit.demo import helloworld dir(helloworld) print helloworld.HelloWorldConfig Let me know the results you find! Thanks for helping to test the package Regards David PS Soon jToolkit should have the ability to run in a standalone mode without mod_python or Apache, which should make testing and initial setup easier |
From: Greenbeard <gre...@ya...> - 2003-10-14 04:02:38
|
Hello there I am running Win2k, Python 2.2, on Apache2 , mod_py 3.0.1 I extracted the archive to site-packages and changed the httpd.conf as shown in your homepage. I get: ----------------------------------------------- Mod_python error: "PythonHandler jToolkit.web" Traceback (most recent call last): File "C:\Python22\Lib\mod_python\apache.py", line 335, in HandlerDispatch result = object(req) File "C:\Python22\Lib\site-packages\jToolkit\web\__init__.py", line 72, in handler instance = getattr(module, instancename) AttributeError: 'module' object has no attribute 'HelloWorldConfig' ----------------------------------------------- Here is httpd.conf <Directory "C:/Program Files/Apache Group/Apache2/htdocs/jtoolkit"> SetHandler python-program PythonHandler jToolkit.web PythonOption jToolkit.module jToolkit.demo.helloworld PythonOption jToolkit.instance HelloWorldConfig PythonDebug On </Directory> TIA, gb400 __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: David F. <da...@sj...> - 2003-08-29 10:06:03
|
This is to announce that the jToolkit project has been created at sourceforge. These lists are for announcements, developer discussions, and user discussions respectively. The CVS list will contain commit messages whenever something is committed... Regards David Fraser |