From: Peter O. <pe...@me...> - 2004-04-20 06:37:31
|
Hi All, I'm having difficulty getting our application running. It requires Python 2.3.3 which I have installed from source at /usr/local/bin on my RedHat 9.0 box which also has Python 2.2.2 at /usr/bin from RPMs. All works OK if I swap the 2.2.2 /usr/bin/python executable with the 2.3.3 one so it looks to me to be a path problem, unfortunately this causes problems for other applications on my system. With the original 2.2.2 /usr/bin/python executable I get errors from our pages not being able to find its includes. The error page is included below. The path does not include the /usr/local/bin directory, thus the pages are running under 2.2.2. I have read the webware and webkit install docs, but they seem to only let me set the environment for the AppServer, not my pages. I have also found a Wiki page at webware.colorstudy.net/twiki/bin/view/Webware/EnvironmentVariables and have modified my /etc/profile to include /usr/local/bin in the PATH. How do I change the path of the environment my pages run in so it includes /usr/local/bin ? Regards Peter Error The site is having technical difficulties with this page. An error has been logged, and the problem will be fixed as soon as possible. Sorry! Traceback Compass/Index.py Traceback (most recent call last): File "/usr/local/Webware/WebKit/Application.py", line 432, in dispatchRawRequest [edit] self.runTransaction(trans) File "/usr/local/Webware/WebKit/Application.py", line 478, in runTransaction [edit] servlet = self._rootURLParser.findServletForTransaction(trans) File "/usr/local/Webware/WebKit/URLParser.py", line 66, in findServletForTransaction [edit] return self.parse(trans, trans.request().urlPath()) File "/usr/local/Webware/WebKit/URLParser.py", line 237, in parse [edit] return fpp.parse(trans, rest) File "/usr/local/Webware/WebKit/URLParser.py", line 294, in parse [edit] return self.parseIndex(trans, requestPath) File "/usr/local/Webware/WebKit/URLParser.py", line 465, in parseIndex [edit] return ServletFactoryManager.servletForFile(trans, names[0]) File "/usr/local/Webware/WebKit/URLParser.py", line 743, in servletForFile [edit] return factory.servletForTransaction(trans) File "/usr/local/Webware/WebKit/ServletFactory.py", line 239, in servletForTransaction [edit] self._classCache[path] = {'mtime': mtime, File "/usr/local/Webware/WebKit/ServletFactory.py", line 286, in loadClass [edit] module = self.importAsPackage(transaction, path) File "/usr/local/Webware/WebKit/ServletFactory.py", line 146, in importAsPackage [edit] module = self._importModuleFromDirectory(fullname, name, moduleDir, forceReload=1) File "/usr/local/Webware/WebKit/ServletFactory.py", line 180, in _importModuleFromDirectory [edit] module = imp.load_module(fullModuleName, fp, pathname, stuff) File "/usr/local/Webware/WebKit/ImportSpy.py", line 177, in load_module [edit] return modloader.load_module(name,(file,filename,description)) File "/usr/local/Webware/WebKit/ImportSpy.py", line 89, in load_module [edit] mod = ihooks.ModuleLoader.load_module(self, name, stuff) File "/usr/lib/python2.2/ihooks.py", line 270, in load_module [edit] m = self.hooks.load_source(name, filename, file) File "/usr/lib/python2.2/ihooks.py", line 168, in load_source [edit] return imp.load_source(name, filename, file) File "Compass/Index.py", line 1, in ? [edit] from SecurePage import SecurePage File "Compass/SecurePage.py", line 4, in ? [edit] from compass.form.factory import FormFactory ImportError: No module named compass.form.factory MiscInfo filename Compass/Index.py os.getcwd() /usr/local/web_work sys.path ['', '/usr/local/Webware', '/usr/lib/python2.2', '/usr/lib/python2.2/plat-linux2', '/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/site-packages', '/usr/lib/python2.2/site-packages/gtk-2.0', '/usr/local/web_work/Cache/PSP'] time Tue Apr 20 13:02:26 2004 Transaction attr value application <WebKit.Application.Application instance at 0x82eed3c> request <WebKit.HTTPRequest.HTTPRequest instance at 0x81f6a94> response <WebKit.HTTPResponse.HTTPResponse instance at 0x8372d44> session None servlet None HTTPRequest attr value args uri '/WK/Compass/' servletPath '/WK' serverSidePath 'Compass/Index.py' pathInfo None pathTranslated '/var/www/html/Compass/' queryString '' method 'GET' sessionId None parents [] fields cookies environ DOCUMENT_ROOT /var/www/html GATEWAY_INTERFACE CGI/1.1 HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p lain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,* /*;q=0.1 HTTP_ACCEPT_CHARSET ISO-8859-1, utf-8;q=0.66, *;q=0.66 HTTP_ACCEPT_ENCODING gzip, deflate, compress;q=0.9 HTTP_ACCEPT_LANGUAGE en-us, en;q=0.50 HTTP_CONNECTION keep-alive HTTP_HOST localhost HTTP_KEEP_ALIVE 300 HTTP_REFERER http://localhost/WK/ HTTP_USER_AGENT Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin PATH_INFO /Compass/ PATH_TRANSLATED /var/www/html/Compass/ QUERY_STRING REMOTE_ADDR 127.0.0.1 REMOTE_PORT 32775 REQUEST_METHOD GET REQUEST_URI /WK/Compass/ SCRIPT_FILENAME /var/www/html/WK SCRIPT_NAME /WK SERVER_ADDR 127.0.0.1 SERVER_ADMIN root@localhost SERVER_NAME localhost SERVER_PORT 80 SERVER_PROTOCOL HTTP/1.1 SERVER_SIGNATURE <address>Apache/2.0.40 Server at localhost Port 80</address> SERVER_SOFTWARE Apache/2.0.40 (Red Hat Linux) UNIQUE_ID 6GUAnH8AAAEAABgrEokAAAAB HTTPResponse attr value args endTime 1082430146.8713019 committed 0 headers content-type text/html cookies Environment CONSOLE /dev/console HOME / INIT_VERSION sysvinit-2.84 LANG en_AU.UTF-8 OLDPWD / PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin PREVLEVEL N PWD /usr/local/web_work RUNLEVEL 5 SHLVL 2 TERM linux _ /usr/bin/python previous N runlevel 5 Ids name value getegid 0 geteuid 0 getgid 0 getpgrp 5568 getpid 6103 getppid 1 getuid 0 Real Life Experiences with Intrepid Travel for people who want to leave their world behind |