Issues import xlrd into Jython 2.5.1[2|3]

142 views
Skip to first unread message

Ouray Viney

unread,
May 1, 2014, 10:27:14 AM5/1/14
to python...@googlegroups.com
Hi,

I am trying to run Python code using xlrd in Jython.  The code runs beautifully in Python 2.7.3, however, the moment I try to run in Jython 2.5.3 it fails with the following error:

mbp-oviney:jython2.5.1 oviney$ ./jython
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_51
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append("/Users/oviney/Downloads/xlrd-0.9.3")
>>> import xlrd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/oviney/Downloads/xlrd-0.9.3/xlrd/__init__.py", line 397
    if peek == b"PK\x03\x04": # a ZIP file
               ^
SyntaxError: no viable alternative at input '"PK\x03\x04"'

Please let me know if you have any suggestions on we can fix this issue.

Thank you!

Ouray
Reply all
Reply to author
Forward
0 new messages