473,715 Members | 5,414 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 2123
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
5992
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
2906
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
1852
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
3179
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
2648
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
2174
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
8823
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
8718
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,...
0
9198
jinu1996
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...
1
9104
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,...
1
6646
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
4477
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
3175
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
2541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2119
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.