Dragon2fly / xlrd3

Other
9 stars 5 forks source link

Problem using #1

Closed CharlesGodwin closed 3 years ago

CharlesGodwin commented 3 years ago

When I run runxlrd.py 3rows ARN1-2013Jun16.xls

I get this error

Traceback (most recent call last):
  File "C:\Users\charl\AppData\Local\Programs\Python\Python37\Scripts\runxlrd.py", line 408, in <module>
    main(av)
  File "C:\Users\charl\AppData\Local\Programs\Python\Python37\Scripts\runxlrd.py", line 301, in main
    mmap_arg = xlrd.USE_MMAP
AttributeError: module 'xlrd3' has no attribute 'USE_MMAP'

The package was installed today using pip. Attached is the file in use when the error occurred.

ARN1-2013Jun16.zip

xlrd: 1.0.0, from C:\Users\charl\AppData\Local\Programs\Python\Python37\lib\site-packages\xlrd3\__init__.py
Python: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
Dragon2fly commented 3 years ago

Sorry for your inconvenience. runxlrd.py wasn't tested during the code refactoring process. Since MMAP is always available in python3+, you can fix it by the following steps:

One question, did you install the old xlrd package before this xlrd3?

CharlesGodwin commented 3 years ago

Those patches fixed the problem.

Yes I had installed xlrd first but abandoned it when I discovered xlrd3.

I have adjusted by uninstalling both xlrd and xlrd3 and then re-installing xlrd3 only.

Thanks.

Dragon2fly commented 3 years ago

I pushed the fix, so I close this issue for now.