I have an application that runs on mod_python/apache using the publisher
handler. It uses an access db as the backend and connects via ADO. In a
test environment on XP it runs fine, but when on a win2k3 server it will
load one page, but all subsequent page loads throw a
pythoncom.CoIni tializeEX error until I restart the apache.
Presumably, this is a threading issue, but I am not sure what the best
approach to fixing it is. Should I simply wrap all COM calls with
pythoncom.CoIni tialize/pythoncom.CoUni nitialize calls, or is this somethig
that needs to be done at a lower level.
This is mod_python 3.2, Python 2.3.5, apache2.0.*, win2k3, ado 2.8, and the
server has 2 processors in case that matters.
Thanks,
-d 1 1517
Some details, and this is weirder than I thought.
It is working fine with internet explorer or mozilla as the client, but only
crashes with Firefox. Moreover, even while firefox is getting errors, IE
stilll works fine.
The error I get is:
Mod_python error: "PythonHand ler mod_python.publ isher"
Traceback (most recent call last):
File "C:\Python23\Li b\site-packages\mod_py thon\apache.py" , line 299, in
HandlerDispatch
result = object(req)
File "C:\Python23\Li b\site-packages\mod_py thon\publisher. py", line 213, in
handler
published = publish_object( req, object)
File "C:\Python23\Li b\site-packages\mod_py thon\publisher. py", line 410, in
publish_object
return publish_object( req,util.apply_ fs_data(object, req.form, req=req))
File "C:\Python23\Li b\site-packages\mod_py thon\util.py", line 439, in
apply_fs_data
return object(**args)
File "E:\http_server \timeslips\inde x.py", line 84, in index
rtn.append(ts_w idget.make_empl oyee_picker())
File "C:\Python23\li b\site-packages\ecptim eslips\ts_widge t.py", line 128,
in make_employee_p icker
rs = win32com.client .Dispatch("ADOD B.Recordset")
File "C:\Python23\Li b\site-packages\win32c om\client\__ini t__.py", line 95,
in Dispatch
dispatch, userName =
dynamic._GetGoo dDispatchAndUse rName(dispatch, userName,clsctx )
File "C:\Python23\Li b\site-packages\win32c om\client\dynam ic.py", line 91,
in _GetGoodDispatc hAndUserName
return (_GetGoodDispat ch(IDispatch, clsctx), userName)
File "C:\Python23\Li b\site-packages\win32c om\client\dynam ic.py", line 79,
in _GetGoodDispatc h
IDispatch = pythoncom.CoCre ateInstance(IDi spatch, None, clsctx,
pythoncom.IID_I Dispatch)
com_error: (-2147221008, 'CoInitialize has not been called.', None, None)
? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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: Gregory (Grisha) Trubetskoy |
last post by:
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.2.7 release of mod_python. Mod_python 3.2.7
is considered a stable release, suitable for production use.
Mod_python is an Apache HTTP Server module that embeds the Python
language interpreter within the server. With mod_python you can write
web-based applications in Python that will run many times faster than
traditional CGI and will have...
|
by: treelife |
last post by:
I'm getting and internal server error when | run the following
mod_python script. I am actually trying to run Django.
Script:
from mod_python import apache
def handler(req):
req.content_type = 'text/plain'
req.write("Under Construction")
|
by: John Salerno |
last post by:
I get this internal error message when I try to access a PSP page:
"Invalid command 'PythonHandler', perhaps mis-spelled or defined by a
module not included in the server configuration"
So it seems that mod_python is not fully configured yet to handled PSP
pages. When I check the installed Apache handlers, there is an entry
called "mod_python .psp" where the first term is the handler and the
second is the extension. I also tried adding...
|
by: Gregory (Grisha) Trubetskoy |
last post by:
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.2.10 release of mod_python. Mod_python
3.2.10 is considered a stable release, suitable for production use.
Mod_python is an Apache HTTP Server module that embeds the Python
language interpreter within the server. With mod_python you can write
web-based applications in Python that will run many times faster than
traditional CGI and will have...
| |
by: boney |
last post by:
hello All,
I am totally unknown to python language..
i need to install mod_python to embed python interpreter with the
Apache server, in order to use Trac with Apache Web Server
i am using :
Python 2.4.3,
|
by: Ben Finney |
last post by:
Howdy all,
I'm working on a web application that is starting to gain a lot of
back-end code written in Python. However, all the current interface
code is written in legacy PHP. I'd like to slowly introduce new
features as Python WSGI programs.
Is it possible to write a Python WSGI program that talks to a PHP
program as its "back end"? Where can I find out how to do this,
preferably with examples?
|
by: Vincent Delporte |
last post by:
Hi
I'm still a newbie when it comes to web applications, so would like
some help in choosing a solution to write apps with Python: What's the
difference between using running it through mod_python vs. building an
application server using Python-based tools like CherryPy, Quixote,
Draco, etc.?
Thanks.
|
by: Gregory (Grisha) Trubetskoy |
last post by:
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.3.1 release of mod_python. Mod_python 3.3.1
is considered a stable release, suitable for production use.
Mod_python is an Apache HTTP Server module that embeds the Python
language interpreter within the server. With mod_python you can write
web-based applications in Python that will run many times faster than
traditional CGI and will have...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |