It doesn't work with my configuration :
WinXP without antivirus and firewall, Python 2.7.6, Excel 2010 en.
Steps to reproduce :
Open Excel
Add the reference ExcelPython 2.7
Paste ?PyStr(PyEval("1+2")) in the immediate window
Press enter : Excel freezes, hangs for ever and requires to be killed
I launched Excel with Visual Studio to see if there is any hidden exception while running the code I got this one:
LoaderLock was detected. Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am guessing this is because ExcelPython initializes Python in the DllMain function. I did not know about the loader lock.
I have recompiled ExcelPython so that rather than initializing Python in the DllMain function it does so lazily outside DllMain.
Could you be so kind as to try replacing ExcelPython27.dll, which should be located either in C:\Windows\System32 or if you have 32-bit Office on 64-bit Windows in C:\Windows\SysWOW64 with one of the attached DLL files, and telling me if it solves the deadlock issue?
I successfully install and use it on a Windows 7 with Python 2.7.6 and Excel 2007. But today, I'm fighting with a Windows XP with Python 2.7.6 and Excel 2007. When trying the simple example
?PyStr(PyEval("1+2"))
does not run, excel closes without prompting with any message.
I am not so familiar with Windows development tool. But I try to attach Visual Studio (version 2005) to the Excel process to get more information. Unfortunately, Excel closed again and no additional information was given in Visual Studio.
how could I provide you with meaningful information to figure out what went wrong?
Thanks in advance for your help,
Frederic
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is strange, and, unfortunately very hard to debug...
All I can think of is if we book a time and you give me remote control of
your PC, say thru team viewer.
I don't know if you'd be comfortable with this though.
Regards,
Eric.
Unfortunately, this won't be possible (its my professional PC). I will wait the upgrade to Win 7. Hopefully that will solve the trouble. Thanks anyway for the support.
Best regards
Frederic
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It doesn't work with my configuration :
WinXP without antivirus and firewall, Python 2.7.6, Excel 2010 en.
Steps to reproduce :
Open Excel
Add the reference ExcelPython 2.7
Paste ?PyStr(PyEval("1+2")) in the immediate window
Press enter : Excel freezes, hangs for ever and requires to be killed
I launched Excel with Visual Studio to see if there is any hidden exception while running the code I got this one:
LoaderLock was detected. Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
I see, well I've never seen that one before. I'll investigate on Monday.
Thanks, regards,
Eric
I am guessing this is because ExcelPython initializes Python in the
DllMain
function. I did not know about the loader lock.I have recompiled ExcelPython so that rather than initializing Python in the
DllMain
function it does so lazily outsideDllMain
.Could you be so kind as to try replacing
ExcelPython27.dll
, which should be located either inC:\Windows\System32
or if you have 32-bit Office on 64-bit Windows inC:\Windows\SysWOW64
with one of the attached DLL files, and telling me if it solves the deadlock issue?Thanks,
Eric.
Last edit: Eric Reynolds 2014-02-10
Dear Eric,
First of all thank you for this great tool.
I successfully install and use it on a Windows 7 with Python 2.7.6 and Excel 2007. But today, I'm fighting with a Windows XP with Python 2.7.6 and Excel 2007. When trying the simple example
?PyStr(PyEval("1+2"))
does not run, excel closes without prompting with any message.
I am not so familiar with Windows development tool. But I try to attach Visual Studio (version 2005) to the Excel process to get more information. Unfortunately, Excel closed again and no additional information was given in Visual Studio.
how could I provide you with meaningful information to figure out what went wrong?
Thanks in advance for your help,
Frederic
That is strange, and, unfortunately very hard to debug...
All I can think of is if we book a time and you give me remote control of
your PC, say thru team viewer.
I don't know if you'd be comfortable with this though.
Regards,
Eric.
Unfortunately, this won't be possible (its my professional PC). I will wait the upgrade to Win 7. Hopefully that will solve the trouble. Thanks anyway for the support.
Best regards
Frederic