Skip to content
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
Closed

Fails with NumPy < 1.7.0 #73

darkxanthos opened this issue Sep 26, 2014 · 4 comments

Comments

@darkxanthos
Copy link

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
Copy link
Member

What version of Python and Numpy are you using?

@darkxanthos
Copy link
Author

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

@fzumstein
Copy link
Member

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
Copy link
Member

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

@fzumstein fzumstein changed the title Example fails on Excel for Mac 2011 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
Projects
None yet
Development

No branches or pull requests

2 participants