Error while importing xlwt3 in Python 3.3.5

This is the place for queries that don't fit in any of the other categories.

Error while importing xlwt3 in Python 3.3.5

Postby sagaboth » Sun Apr 20, 2014 6:17 pm

I' ve just istalled version 3.3.5 of Python. I also installed two modules, which I used with Python 3.2 without problems: xlrd3 and xlwt3. While importing xlwt3 in my program, I receive following errors (first is different than the second):

Code: Select all
>>> import xlwt3 as xlwt
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    import xlwt3 as xlwt
  File "C:\Python33\lib\site-packages\xlwt3\__init__.py", line 3, in <module>
    from .workbook import Workbook
  File "C:\Python33\lib\site-packages\xlwt3\workbook.py", line 5, in <module>
    from .worksheet import Worksheet
  File "C:\Python33\lib\site-packages\xlwt3\worksheet.py", line 7, in <module>
    from .row import Row
  File "C:\Python33\lib\site-packages\xlwt3\row.py", line 8, in <module>
    from . import formula
  File "C:\Python33\lib\site-packages\xlwt3\formula.py", line 6, in <module>
    class Formula(object):
ValueError: '__init__' in __slots__ conflicts with class variable

>>> import xlwt3 as xlwt
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import xlwt3 as xlwt
  File "C:\Python33\lib\site-packages\xlwt3\__init__.py", line 3, in <module>
    from .workbook import Workbook
  File "C:\Python33\lib\site-packages\xlwt3\workbook.py", line 1, in <module>
    from . import biffrecords
ImportError: cannot import name biffrecords


Is there any problem with xlwt3 in python 3.3? Should I return to version 3.2 or perhaps there is another reason for this behaviour?
Last edited by micseydel on Sun Apr 20, 2014 6:45 pm, edited 1 time in total.
Reason: Code tags, lock.
sagaboth
 
Posts: 2
Joined: Sun Apr 20, 2014 5:57 pm

Re: Error while importing xlwt3 in Python 3.3.5

Postby micseydel » Mon Apr 21, 2014 11:37 pm

It looks like someone found a solution here -- http://stackoverflow.com/questions/1849 ... wt3-python
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1260
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Error while importing xlwt3 in Python 3.3.5

Postby sagaboth » Tue Apr 22, 2014 6:35 pm

Thank you for this information. I removed the "__init__" string from the __slots__ definition in Formula.py module and it now works fine.
sagaboth
 
Posts: 2
Joined: Sun Apr 20, 2014 5:57 pm


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 6 guests