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

Fails with NumPy < 1.7.0 #73

Closed
darkxanthos opened this Issue Sep 26, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@darkxanthos

darkxanthos commented Sep 26, 2014

I tried the first example in the readme:

>>> from xlwings import Workbook, Sheet, Range, Chart
>>> wb = Workbook()  # Creates a connection with a new workbook
>>> Range('A1').value = 'Foo 1'

It fails with error code

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/xlwings/main.py", line 430, in value
    if hasattr(np, 'ndarray') and np.isnan(data):
NotImplementedError: Not implemented for this type

It works if I make it an array:

>>> Range('A1').value = [['Foo 1']]
@fzumstein

This comment has been minimized.

Member

fzumstein commented Sep 26, 2014

What version of Python and Numpy are you using?

@darkxanthos

This comment has been minimized.

darkxanthos commented Sep 26, 2014

$ python --version
Python 2.7.5
$ python
>>> import numpy
>>> numpy.__version__
'1.6.2'
>>> import xlwings
>>> xlwings.__version__
'0.2.2'
@fzumstein

This comment has been minimized.

Member

fzumstein commented Sep 26, 2014

I suspect that upgrading to NumPy >=1.8.0 would resolve it, but will look into it over the weekend in case you can't upgrade.

@fzumstein fzumstein added this to the v0.2.3 milestone Sep 26, 2014

@fzumstein

This comment has been minimized.

Member

fzumstein commented Sep 30, 2014

The error happens with NumPy < 1.7.0 because np.isnan('string') is returning NotImplementedError instead of TypeError

@fzumstein fzumstein closed this in eaa34f0 Oct 6, 2014

@fzumstein fzumstein changed the title from Example fails on Excel for Mac 2011 to Fails with NumPy < 1.7.0 Oct 6, 2014

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