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

[Win] COM Retry wrapper fails when clicking around in Excel #587

Closed
fzumstein opened this Issue Nov 20, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@fzumstein
Member

fzumstein commented Nov 20, 2016

import xlwings as xw
import time
import datetime as dt

xw.Range('A1').number_format = 'dd/mm/yy hh:mm:ss'  # include seconds
while True:
    xw.Range('A1').value = dt.datetime.now()
    time.sleep(0.5)

This works when writing into a cell - it resumes correctly. But when double clicking a few cells randomly, it fails with the following error:

                 Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\main.py", line 1498, in value
    conversion.write(data, self, self._options)
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\conversion\__init__.py", line 35, in write
    pipeline(ctx)
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\conversion\framework.py", line 66, in __call__
    stage(*args, **kwargs)
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\conversion\standard.py", line 91, in __call__
    self._write_value(ctx.range, ctx.value, scalar)
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\conversion\standard.py", line 71, in _write_value
    rng.raw_value = value
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\main.py", line 1119, in raw_value
    self.impl.raw_value = data
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\_xlwindows.py", line 710, in raw_value
    self.xl.Value = data
  File "C:\Users\felix\Anaconda\lib\site-packages\xlwings\_xlwindows.py", line 99, in __setattr__
    return setattr(self._inner, key, value)
  File "C:\Users\felix\Anaconda\lib\site-packages\win32com\client\dynamic.py", line 565, in __setattr__
    self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2146777998), None)
@Ashish424

This comment has been minimized.

Ashish424 commented Jan 7, 2018

Can you tell when this issue is planned to resolve?This is really critical for an application I am working on and will be grateful to see this fixed.

@fzumstein

This comment has been minimized.

Member

fzumstein commented Jan 7, 2018

It looks like a bug that's hard to track down and at the same time not critical for most users, so no, I can't give you a timeline.

@Ashish424

This comment has been minimized.

Ashish424 commented Jan 7, 2018

Ok,thanks.

@fzumstein fzumstein modified the milestones: short list, v0.11.6 Jan 22, 2018

fzumstein added a commit that referenced this issue Jan 23, 2018

Merge pull request #800 from ZoomerAnalytics/xlwings-586-fix-retry-wr…
…apper

fixed COM retry wrapper when clicking in cells closes #587

@fzumstein fzumstein changed the title from COM Retry wrapper fails when clicking around in Excel to [Win] COM Retry wrapper fails when clicking around in Excel Jan 23, 2018

@fzumstein

This comment has been minimized.

Member

fzumstein commented Jan 23, 2018

@Ashish424 is now fixed and will be part of upcoming 0.11.6 release

@Ashish424

This comment has been minimized.

Ashish424 commented Aug 3, 2018

I checked this project after a long time,Thanks a lot :)

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