[python-win32] Error R6034 when I import uuid
Blair Hall
blairdhall at gmail.com
Sat Oct 18 02:24:05 CEST 2014
OK, sorry, here are some more details.
I have Python 2.7.8, win32, running on a Windows7 64-bit home machine (not
professional).
Here is my python script:
#---------------------------------------
import pythoncom
#import uuid
class Bug:
_reg_clsid_ = '{E3D5F332-F080-47B3-A319-A3A0E287E466}'
_reg_progid_ = "BugServer"
_public_methods_ = ['hello']
def __init__(self):
pass
#------------------------------------------------------------------------
def hello(self,who):
return "Hello {}".format(who)
#============================================================================
if __name__=='__main__':
# cmd options: --register --debug and --unregister
import win32com.server.register
win32com.server.register.UseCommandLine(Bug)
#---------------------------------------------
As it is, this works fine. I just run the script with an Admin command
window to register the server. But when I uncomment the 'import uuid' line
the error occurs as Excel opens.
In my VBA code I have (in ThisWorkbook)
Private Sub Workbook_Open()
' When the workbook opens we create the object
Set Bug = CreateObject("BugServer")
Debug.Print "open"
End Sub
and in a separate module I have defined the UDF
Public Bug As Object
Function hello(ByVal expr As String) As Variant
'
'
hello = Bug.hello(expr)
End Function
Thanks for the help.
On Fri, Oct 17, 2014 at 8:18 PM, Vernon D. Cole <vernondcole at gmail.com>
wrote:
> Which version of Python are you running?
> 32 or 64 bit?
> Which version of pywin32?
> Which version of Windows?
> Can you make a small test case that will demonstrate the error?
>
>
> On Thu, Oct 16, 2014 at 7:47 PM, Blair Hall <blairdhall at gmail.com> wrote:
>
>> I have a small python COM server that worked fine with Excel until I
>> decided to import the standard Python 'uuid' module.
>>
>> Now I get the Windows Runtime error R6034 "An application has made an
>> attempt to load the C runtime library incorrectly"
>>
>> I there anything that I can do to fix this?
>>
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> https://mail.python.org/mailman/listinfo/python-win32
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20141018/a8d26b5d/attachment.html>
More information about the python-win32
mailing list