that was the error for the example from the website.
here it the error for my program. 

Traceback (most recent call last):
  File "C:\Homework\Python\main.py", line 73, in <module>
    main()
  File "C:\Homework\Python\main.py", line 68, in main
    queueinfo = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")
  File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95, in 
Dispatch
    dispatch, userName = 
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 98, in 
_GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 78, in 
_GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, 
pythoncom.IID_IDispatch)
com_error: (-2147221164, 'Class not registered', None, None)

Sagar Khushalani <[EMAIL PROTECTED]> wrote: Thanks! Another question, related 
and random. Someone, anyone?

I am trying to implement an MSMQ, and I have no idea whats going wrong. I 
looked at:

http://comsci.liu.edu/~murali/python/python28.txt

one of the few places that actually has help with that. I tried to implement it 
but for some reason it didnt work. I even tried just the Example #1, and even 
that didnt work. I have attached the error in the text file.I know its a long 
error, but I can't find any decent documentation on win32com and MSMQs. This is 
the same error I get when I tried my own program. In the main file, I put this:

    queueinfo = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")
    queueinfo.PathName = ".\\private$\ErrorQueue"
    queue = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")

and I have the Open and rest of the stuff in another file which is a different 
process and adds/removes stuff from it.   

    queueinfo = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")
    queueinfo.PathName = ".\\private$\ErrorQueue"
    queue = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")

            msg = win32com.client.Dispatch("MSMQ.MSMQMessage")
            if eval(sec)%2 == 0:
                self.txtArea.WriteText("Service is up and running\n")
                msg.Label = "ON"
                msg.Body = "P1:UP"
                  msg.Send(self.errors)
            else:
                self.txtArea.WriteText("Error! Writing message to queue. 
Service is down\n")
                msg.Label = "ERROR"
                msg.Body = "P1:DOWN"
                msg.Send(self.errors)
            self.errors.Close()

Please help me. I'm very confused.



Tim Roberts <[EMAIL PROTECTED]> wrote: Sagar Khushalani wrote:
> I'm using wxPython and   the processing module. I create a "main" file 
> which has a gui with buttons. Each button creates starts a separate 
> process. However, when I click any of the buttons, I get an 
> stderr/stdout box from wxPython with the following error. I checked 
> online, and found some similar errors that are related to bugs, but 
> they were not exactly the same. Has anyone had the same problem?
>  
> Traceback (most recent call last):
>   File "C:\Homework\Python\main.py", line 54, in startP1
>     p1.start()
>   File "C:\Python25\Lib\site-packages\processing\process.py", line 
> 111, in start
>     self._popen = Popen(self, self._stoppable)
>   File "C:\Python25\Lib\site-packages\processing\process.py", line 
> 393, in __init__
>     creationflags=new_console and CREATE_NEW_PROCESS_GROUP
>   File "C:\Python25\lib\subprocess.py", line 586, in __init__
>     errread, errwrite) =   self._get_handles(stdin, stdout, stderr)
>   File "C:\Python25\lib\subprocess.py", line 715, in _get_handles
>     c2pwrite = self._make_inheritable(c2pwrite)
>   File "C:\Python25\lib\subprocess.py", line 744, in _make_inheritable
>     DUPLICATE_SAME_ACCESS)
> WindowsError: [Error 6] The handle is invalid
> I get this error regardless of whether I run it from IDLE or from the 
> DOS prompt.

By default, a Windows GUI application does not have stdin (or stdout or 
stderr, but wxPython can provide those).  The files are not created, so 
the handles are invalid.

You might try something like this:
    sys.stdin = open('nul','rb')
If that doesn't work, try asking on the wxPython mailing list.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing   list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32



Sagar Khushalani
  Graduate Student, UTA
  Networking / Systems and Architecture
[EMAIL PROTECTED] 
http://www.sagark.info
        

---------------------------------
  Yahoo! Answers - Get better answers from someone who knows. Try it now.

Sagar Khushalani
  Graduate Student, UTA
  Networking / Systems and Architecture
[EMAIL PROTECTED] 
http://www.sagark.info
          

---------------------------------
 Support the World Aids Awareness campaign this month with Yahoo! for Good  
Traceback (most recent call last):
  File 
"C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 
307, in RunScript
    debugger.run(codeObject, __main__.__dict__, start_stepping=0)
  File "C:\Python25\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", 
line 60, in run
    _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
  File "C:\Python25\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", 
line 631, in run
    exec cmd in globals, locals
  File "C:\Homework\Python\test.py", line 12, in 
    qinfo=win32com.client.Dispatch("MSMQ.MSMQQueueInfo")
  File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95, in 
Dispatch
    dispatch, userName = 
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 98, in 
_GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 78, in 
_GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, 
pythoncom.IID_IDispatch)
com_error: (-2147221164, 'Class not registered', None, 
None)_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32



Sagar Khushalani
  Graduate Student, UTA
  Networking / Systems and Architecture
[EMAIL PROTECTED] 
http://www.sagark.info

       
---------------------------------
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to