I have mod_python 2.7.10 running with python 2.3.4 and am getting an odd
error. The error is happening on the production machine, and not on my
development machine.
I am using the publisher handler and am calling the index function with this
code:
----------------------------------
from mod_python import apache
import random
def index(req):
return "hello world"
--------------------------------------
I am getting the following error:
----------------------------------------
File
"/usr/local/python/lib/python2.3/site-packages/mod_python/publisher.py",
line 130, in handler
module = apache.import_m odule(module_na me, _req, [path])
File "/usr/local/python/lib/python2.3/site-packages/mod_python/apache.py",
line 335, in import_module
module = imp.load_module (mname, f, p, d)
File "/var/www/html/test.py", line 2, in ?
import random
File "/usr/local/python/lib/python2.3/random.py", line 54, in ?
LOG4 = _log(4.0)
ValueError: (84, 'Invalid or incomplete multibyte or wide character')
------------------------------------------------
Does anybody know what may cause this? I have searched the error in google
and have little success. I am thinking it is some sort of encoding error
or something, but I don't know why this is only happening in production.
Note that this error is only occuring when I import the random module, and
if I comment that out everything works fine. However I need the random
module for some of my other code.
Also if I run the following from the command line it works fine:
-------------------------------------------------
import random
print "hello world"
-------------------------------------------------
I don't know if it matters but I am running:
apache 1.3.27
redhat 7.2
Thanks,
Charliek 0 990 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lorenz Köhl |
last post by:
hi,
I've python 2.3 and apache 2.0.47 installed on my SuSE8.2.
when trying to compile modpython into apache, make stops with the error
----
In file included from /usr/local/include/python2.3/Python.h:8,
from /home/software/network/apache/mod_python-3.0.3/src/include/mod_python.h:92,
from requestobject.c:64:
/usr/local/include/python2.3/pyconfig.h:844:1: warning: "_POSIX_C_SOURCE" redefined
|
by: Armand Federico - INFO |
last post by:
I received an error when i try htmlgen on winxp, apapche, mysql, mod_python
THIS IS THE ERROR
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "C:\PROGRA~1\PYTHON~1\lib\site-packages\mod_python\apache.py", line
193, in Dispatch
result = object(req)
|
by: Michele Petrazzo |
last post by:
I'm using PyChart like a module for create charts into a little web
site, but when I try to create one, I have this error:
/var/www/html/lgt/draw.py:19, in draw:
can = canvas.init(self.file_name)
/usr/lib/python2.3/site-packages/pychart/canvas.py:60, in init:
can = pngcanvas.T(fname)
/usr/lib/python2.3/site-packages/pychart/pscanvas.py:25, in __init__:
basecanvas.T.__init__(self)...
|
by: Julien Cigar |
last post by:
Hello,
I'm using mod_python 3.1.3 with Apache 2.0.54 on a Debian box with the
publisher handler and the Clearsilver template engine, and from time to
time apache returns an 500 error code (Internal Server Error).
Apache errog.log file looks like :
PythonHandler
mod_python.publisher: Traceback (most recent call last):
PythonHandler
|
by: Anthony L. |
last post by:
I am writing a web application that is comparable to a content
management system used in blogging. I really want to use Python after
having done some evaluation coding using Python 2.3.5 with mod_python
3.1.4 running on Apache 2.0 with the Publisher handler.
However, I am still very hesitant to settle on Python. All my research
brings up the same collection of scant articles and old mailing list
messages that reference each other. I am...
| |
by: m.banaouas |
last post by:
Hi,
bonjour,
witch versions are suitable to use for apache & mod_python ?
Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent
versions) without facing any known major issue ?
thanks for any help.
|
by: Michael |
last post by:
Hey everyone,
Is it possible to automatically insert headers/footers using
mod_python?
I will be not be using PSP's, so I cannot use the PSP/include solution.
Furthermore, the header will be dynamic; it won't be a static HTML
page.
In short, I've been looking for a page layout facility using
mod_python.
|
by: deepak |
last post by:
I installed apache 2.2.4 and modPython 3.3.1 on Fc6
while starting the apache server the following error occurs:
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_python.so into server: /usr/
local/apache2/modules/mod_python.so: cannot restore segment prot after
reloc: Permission denied
help plz
|
by: Aaron Scott |
last post by:
I've installed mod_python, and everything seems to be working, but it
fails when I try to import another file into the file that's actually
producing the output. I have these lines at the top of index.py:
from mod_python import apache
from storylab import *
.... and in the directory where index.py resides (/htdocs/python/), I
have a directory called "storylab". Inside that directory is
__init__.py. When I try to execute...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |