473,728 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why did wxpython MakeActiveXclas s stopped working?!?!!?!?

HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 353, in __init__
self.CreateActi veXplayer()
File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 363, in CreateActiveXpl ayer
self.Player = PlayerActiveXCl ass(self, -1)
File
"C:\Python24\Li b\site-packages\wx-2.6-msw-ansi\wx\lib\act ivexwrapper.py" ,
line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\a ctivex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateC ontrol(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle
Here is a snippet from my code:

from wxPython.lib.ac tivexwrapper import MakeActiveXClas s
import win32com
from win32com import client

class wxWMPlayer(wxPa nel):
def __init__(self, parent):
wxPanel.__init_ _(self, parent, -1,
style=wxCLIP_CH ILDREN|wxNO_FUL L_REPAINT_ON_RE SIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindow Properties()
self.CreateActi veXplayer()

def InitWindowPrope rties(self):
self.WindowsMed iaPlayerTopSize r = wxBoxSizer(wxVE RTICAL)
self.SetSizer(s elf.WindowsMedi aPlayerTopSizer )
self.SetAutoLay out(1)

def CreateActiveXpl ayer(self):
PlayerModule =
win32com.client .gencache.Ensur eModule('{6BF52 A50-394A-11D3-B153-00C04F79FAA6}',
0,1,0)
PlayerActiveXCl ass =
MakeActiveXClas s(PlayerModule. WindowsMediaPla yer, eventObj = self)
self.Player = PlayerActiveXCl ass(self, -1)
self.Player.isP laying = 0
self.Player.uiM ode = 'full'
self.WindowsMed iaPlayerTopSize r.Add(self.Play er, 1, wxEXPAND)
Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba

Aug 6 '06 #1
4 2124
jojoba wrote:
HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 353, in __init__
self.CreateActi veXplayer()
File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 363, in CreateActiveXpl ayer
self.Player = PlayerActiveXCl ass(self, -1)
File
"C:\Python24\Li b\site-packages\wx-2.6-msw-ansi\wx\lib\act ivexwrapper.py" ,
line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\a ctivex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateC ontrol(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle
Here is a snippet from my code:

from wxPython.lib.ac tivexwrapper import MakeActiveXClas s
import win32com
from win32com import client

class wxWMPlayer(wxPa nel):
def __init__(self, parent):
wxPanel.__init_ _(self, parent, -1,
style=wxCLIP_CH ILDREN|wxNO_FUL L_REPAINT_ON_RE SIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindow Properties()
self.CreateActi veXplayer()

def InitWindowPrope rties(self):
self.WindowsMed iaPlayerTopSize r = wxBoxSizer(wxVE RTICAL)
self.SetSizer(s elf.WindowsMedi aPlayerTopSizer )
self.SetAutoLay out(1)

def CreateActiveXpl ayer(self):
PlayerModule =
win32com.client .gencache.Ensur eModule('{6BF52 A50-394A-11D3-B153-00C04F79FAA6}',
0,1,0)
PlayerActiveXCl ass =
MakeActiveXClas s(PlayerModule. WindowsMediaPla yer, eventObj = self)
self.Player = PlayerActiveXCl ass(self, -1)
self.Player.isP laying = 0
self.Player.uiM ode = 'full'
self.WindowsMed iaPlayerTopSize r.Add(self.Play er, 1, wxEXPAND)
Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba

Did you reinstall pywin32 ?

Philippe
Aug 6 '06 #2
Philippe Martin wrote:
jojoba wrote:
>HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documen ts and
Settings\jojob a.DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 353, in __init__
self.CreateActi veXplayer()
File "C:\Documen ts and
Settings\jojob a.DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 363, in CreateActiveXpl ayer
self.Player = PlayerActiveXCl ass(self, -1)
File
"C:\Python24\L ib\site-packages\wx-2.6-msw-ansi\wx\lib\act ivexwrapper.py" ,
line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\a ctivex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateC ontrol(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle
Here is a snippet from my code:

from wxPython.lib.ac tivexwrapper import MakeActiveXClas s
import win32com
from win32com import client

class wxWMPlayer(wxPa nel):
def __init__(self, parent):
wxPanel.__init_ _(self, parent, -1,
style=wxCLIP_C HILDREN|wxNO_FU LL_REPAINT_ON_R ESIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindow Properties()
self.CreateActi veXplayer()

def InitWindowPrope rties(self):
self.WindowsMed iaPlayerTopSize r = wxBoxSizer(wxVE RTICAL)
self.SetSizer(s elf.WindowsMedi aPlayerTopSizer )
self.SetAutoLay out(1)

def CreateActiveXpl ayer(self):
PlayerModule =
win32com.client .gencache.Ensur eModule('{6BF52 A50-394A-11D3-B153-00C04F79FAA6}',
>0,1,0)
PlayerActiveXCl ass =
MakeActiveXCla ss(PlayerModule .WindowsMediaPl ayer, eventObj = self)
self.Player = PlayerActiveXCl ass(self, -1)
self.Player.isP laying = 0
self.Player.uiM ode = 'full'
self.WindowsMed iaPlayerTopSize r.Add(self.Play er, 1, wxEXPAND)
Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba


Did you reinstall pywin32 ?

Philippe
Well I'm silly: it would not import.


Aug 6 '06 #3
Hi Phillipe!
Thanks for the response!

Unfortunately, i have also reinstalled pywin32, and i still get the
same error.

Isn't this weird?
You know what else.

I have a py2exe version of this code, that actually runs fine, using
the embedded windows media player. But Im guessing i made that py2exe
distributable with older pywin32 and older wxpython.
This makes me think that one of the newer versions of pywin32 or
wxpython is giving me that error trouble.

Any other ideas on how to rectify this?
Thanks again,
jojoba
Philippe Martin wrote:
Philippe Martin wrote:
jojoba wrote:
HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 353, in __init__
self.CreateActi veXplayer()
File "C:\Documen ts and
Settings\jojoba .DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 363, in CreateActiveXpl ayer
self.Player = PlayerActiveXCl ass(self, -1)
File
"C:\Python24\Li b\site-packages\wx-2.6-msw-ansi\wx\lib\act ivexwrapper.py" ,
line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\a ctivex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateC ontrol(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle
Here is a snippet from my code:

from wxPython.lib.ac tivexwrapper import MakeActiveXClas s
import win32com
from win32com import client

class wxWMPlayer(wxPa nel):
def __init__(self, parent):
wxPanel.__init_ _(self, parent, -1,
style=wxCLIP_CH ILDREN|wxNO_FUL L_REPAINT_ON_RE SIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindow Properties()
self.CreateActi veXplayer()

def InitWindowPrope rties(self):
self.WindowsMed iaPlayerTopSize r = wxBoxSizer(wxVE RTICAL)
self.SetSizer(s elf.WindowsMedi aPlayerTopSizer )
self.SetAutoLay out(1)

def CreateActiveXpl ayer(self):
PlayerModule =
win32com.client .gencache.Ensur eModule('{6BF52 A50-394A-11D3-B153-00C04F79FAA6}',
0,1,0)
PlayerActiveXCl ass =
MakeActiveXClas s(PlayerModule. WindowsMediaPla yer, eventObj = self)
self.Player = PlayerActiveXCl ass(self, -1)
self.Player.isP laying = 0
self.Player.uiM ode = 'full'
self.WindowsMed iaPlayerTopSize r.Add(self.Play er, 1, wxEXPAND)
Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba

Did you reinstall pywin32 ?

Philippe

Well I'm silly: it would not import.
Aug 6 '06 #4
jojoba wrote:
Hi Phillipe!
Thanks for the response!

Unfortunately, i have also reinstalled pywin32, and i still get the
same error.

Isn't this weird?
You know what else.

I have a py2exe version of this code, that actually runs fine, using
the embedded windows media player. But Im guessing i made that py2exe
distributable with older pywin32 and older wxpython.
This makes me think that one of the newer versions of pywin32 or
wxpython is giving me that error trouble.

Any other ideas on how to rectify this?
Thanks again,
jojoba
Philippe Martin wrote:
>Philippe Martin wrote:
jojoba wrote:

HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documen ts and
Settings\jojob a.DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 353, in __init__
self.CreateActi veXplayer()
File "C:\Documen ts and
Settings\jojob a.DEMO-019591FB22\Desk top\Projects\Sr Asse
ts\sr.py", line 363, in CreateActiveXpl ayer
self.Player = PlayerActiveXCl ass(self, -1)
File
"C
\Python24\Lib\s ite-packages\wx-2.6-msw-ansi\wx\lib\act ivexwrapper.py" ,
> line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\a ctivex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateC ontrol(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle
Here is a snippet from my code:

from wxPython.lib.ac tivexwrapper import MakeActiveXClas s
import win32com
from win32com import client

class wxWMPlayer(wxPa nel):
def __init__(self, parent):
wxPanel.__init_ _(self, parent, -1,
style=wxCLIP_C HILDREN|wxNO_FU LL_REPAINT_ON_R ESIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindow Properties()
self.CreateActi veXplayer()

def InitWindowPrope rties(self):
self.WindowsMed iaPlayerTopSize r = wxBoxSizer(wxVE RTICAL)
self.SetSizer(s elf.WindowsMedi aPlayerTopSizer )
self.SetAutoLay out(1)

def CreateActiveXpl ayer(self):
PlayerModule =

win32com.client .gencache.Ensur eModule('{6BF52 A50-394A-11D3-B153-00C04F79FAA6}',
>0,1,0)
PlayerActiveXCl ass =
MakeActiveXCla ss(PlayerModule .WindowsMediaPl ayer, eventObj = self)
self.Player = PlayerActiveXCl ass(self, -1)
self.Player.isP laying = 0
self.Player.uiM ode = 'full'
self.WindowsMed iaPlayerTopSize r.Add(self.Play er, 1, wxEXPAND)
Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba
Did you reinstall pywin32 ?

Philippe

Well I'm silly: it would not import.
Hi,

I'd post this to wx************@ lists.wxwidgets .org

Philippe

Aug 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5993
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is a ocx developed my me use vc6,this ocx works fine in wxpython. but you can see i only change this ocx with a new DICOM ocx and set up eventClass,
15
2907
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems to be more low-level than the other GUI toolkits I've used (Tk, GTK, and Trestle), and there are all sorts exposed details in wxWindows/wxPython that I find weird.
10
4970
by: Mario | last post by:
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but is impossible to use this script even if I do exactly as said there. I think the script is buggy or I am not able to use it, even if seems very simple to use... Anyone can give me an hint on how to easily and simply print...
25
4278
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
12
1853
by: vivainio | last post by:
I rarely do GUIs, and reminded myself today why that is the case (simply, it's not fun). I implemented a simple TreeCtrl, and had to implement my own 'children' method, of all things! Here it is: def children(self,node): c =
4
3180
by: kkt49 | last post by:
# vim: et sw=4 ts=8 sts from wxPython.wx import * import sys, os, time import pywintypes import win32serviceutil import win32service import win32event import win32process
8
2649
by: Sean DiZazzo | last post by:
Is there something special you have to do to get a wxPython app to run remotely under xwindows? My Tkinter apps always automatically work that way, so I was surprised to even be confronted with this problem. ~Sean
12
2176
by: bullockbefriending bard | last post by:
I am a complete ignoramus and newbie when it comes to designing and coding networked clients (or servers for that matter). I have a copy of Goerzen (Foundations of Python Network Programming) and once pointed in the best direction should be able to follow my nose and get things sorted... but I am not quite sure which is the best path to take and would be grateful for advice from networking gurus. I am writing a program to display horse...
2
2855
tharden3
by: tharden3 | last post by:
Ok, I've been going through these tutorials for both PyGame and wxPython, but I've hit a big speed bump. In each tutorial, I've gotten to the point where I need to "import" or "load" images for various purposes (animation, icons, etc.). Each time I follow the tutorial, I can't quite get it right... please don't tell me "Hey, you can't use the pictures in the tutorial example because those are not the directories, paths, or pics that are on your ...
0
8894
marktang
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...
0
9411
Oralloy
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...
0
9122
tracyyun
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...
1
6704
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6012
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();...
0
4522
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...
1
3230
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
2
2643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2159
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.