Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13781 closed defect (cantfix)

ExcelDownloadPlugin does not work with 1.4.1

Reported by: laszlo.elbert@… Owned by: Jun Omae
Priority: normal Component: ExcelDownloadPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.4

Description (last modified by Ryan J Ollos)

Dear Colleagues,

After installation the plugin fails:

Trac detected an internal error:

ImportError: cannot import name NamedStyle

Python Traceback

Most recent call last:

    File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 639 , in dispatch_request
    File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 252 , in dispatch
    File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 495 , in _post_process_request
    File "build/bdist.linux-i686/egg/tracexceldownload/ticket.py", line 419 , in post_process_request
    File "build/bdist.linux-i686/egg/tracexceldownload/ticket.py", line 425 , in _convert_report
    File "build/bdist.linux-i686/egg/tracexceldownload/api.py", line 60 , in get_workbook_writer
    File "build/bdist.linux-i686/egg/tracexceldownload/api.py", line 204 , in __init__
    File "build/bdist.linux-i686/egg/tracexceldownload/api.py", line 113 , in __init__
    File "build/bdist.linux-i686/egg/tracexceldownload/api.py", line 216 , in _get_excel_styles 

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 4 years ago by Jun Omae

Resolution: cantfix
Status: newclosed

That's an installationn issue. Your installed openpyxl is broken.

The NamedStyle is available on fresh installation.

$ /dev/shm/t13781/bin/pip install openpyxl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
...
Collecting jdcal
  Using cached jdcal-1.4.1-py2.py3-none-any.whl (9.5 kB)
Installing collected packages: et-xmlfile, jdcal, openpyxl
Successfully installed et-xmlfile-1.0.1 jdcal-1.4.1 openpyxl-2.6.4

$ /dev/shm/t13781/bin/python
Python 2.7.12 (default, Oct  8 2019, 14:14:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import openpyxl
>>> openpyxl.__version__
'2.6.4'
>>> from openpyxl.styles import NamedStyle
>>> NamedStyle
<class 'openpyxl.styles.named_styles.NamedStyle'>
>>> 

comment:3 Changed 4 years ago by laszlo.elbert@…

Thanks for the resolution. I had to remove all dependencies and reinstall. It works now. Thanks for looking. Best Laszlo

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.