New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log File Error Causes failure to terminate in xlwings VBA on macOS. #666

timvkuijk opened this Issue Apr 25, 2017 · 1 comment


None yet
2 participants

timvkuijk commented Apr 25, 2017

If I call a Python program using the RunPython method from VBA in Microsoft Excel 2016 for macOS, I get a timeout. This is based, I've found, on the amount of print statements included in the program.

I created a simple enough program to replicate the program. Basically, when the program prints to xlwings_log.txt excessively, it fails in some way. If you look at the xlwings_log.txt file, the print statements are all there, except the file ends in

2.... (through to)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'module' object is not callable

The xlwings program in VBA will stay running, eventually causing Microsoft Excel to stop responding. At a certain point it will ask you to wait or quit Excel. If you wait, eventually the program terminates and xlwings_log.txt is deleted.

Basically, some error is causing Excel to hand when the file prints enough. If you reduce the print statements to 1000, there doesn't seem to be an issue.

import xlwings as xw

wb.sheets[0].range('A1').value = 'Hello World'

for i in range(100000):

wb.sheets[0].range('A1').value = 'Hello World-fail to terminate'

@fzumstein fzumstein added this to the v0.10.5 milestone Apr 27, 2017

fzumstein added a commit that referenced this issue Apr 27, 2017


This comment has been minimized.


fzumstein commented Apr 27, 2017

will be fixed on 0.10.5

@fzumstein fzumstein closed this Apr 27, 2017

fzumstein added a commit that referenced this issue Jun 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment