Opened 14 years ago
Closed 14 years ago
#8805 closed defect (fixed)
compling with python 2.4 fails: at: class NumberFormat():
Reported by: | Owned by: | ben_12 | |
---|---|---|---|
Priority: | high | Component: | ExportImportXlsPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
trying to compile your code by "python setup.py bdist_egg" fails with below messages:
running bdist_egg running egg_info creating ImportExportXLS.egg-info writing ImportExportXLS.egg-info\PKG-INFO writing top-level names to ImportExportXLS.egg-info\top_level.txt writing dependency_links to ImportExportXLS.egg-info\dependency_links.txt writing entry points to ImportExportXLS.egg-info\entry_points.txt writing manifest file 'ImportExportXLS.egg-info\SOURCES.txt' reading manifest file 'ImportExportXLS.egg-info\SOURCES.txt' writing manifest file 'ImportExportXLS.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py creating build creating build\lib creating build\lib\importexportxls copying importexportxls\admin_ui.py -> build\lib\importexportxls copying importexportxls\formats.py -> build\lib\importexportxls copying importexportxls\__init__.py -> build\lib\importexportxls creating build\lib\importexportxls\templates copying importexportxls\templates\importexport_done.html -> build\lib\importexportxls\templates copying importexportxls\templates\importexport_preview.html -> build\lib\importexportxls\templates copying importexportxls\templates\importexport_webadminui.html -> build\lib\importexportxls\templates creating build\bdist.win32 creating build\bdist.win32\egg creating build\bdist.win32\egg\importexportxls copying build\lib\importexportxls\admin_ui.py -> build\bdist.win32\egg\importexportxls copying build\lib\importexportxls\formats.py -> build\bdist.win32\egg\importexportxls creating build\bdist.win32\egg\importexportxls\templates copying build\lib\importexportxls\templates\importexport_done.html -> build\bdist.win32\egg\importexportxls\templates copying build\lib\importexportxls\templates\importexport_preview.html -> build\bdist.win32\egg\importexportxls\templates copying build\lib\importexportxls\templates\importexport_webadminui.html -> build\bdist.win32\egg\importexportxls\templates copying build\lib\importexportxls\__init__.py -> build\bdist.win32\egg\importexportxls byte-compiling build\bdist.win32\egg\importexportxls\admin_ui.py to admin_ui.pyc byte-compiling build\bdist.win32\egg\importexportxls\formats.py to formats.pyc File "build\bdist.win32\egg\importexportxls\formats.py", line 52 class NumberFormat(): ^ SyntaxError: invalid syntax byte-compiling build\bdist.win32\egg\importexportxls\__init__.py to __init__.pyc creating build\bdist.win32\egg\EGG-INFO copying ImportExportXLS.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO copying ImportExportXLS.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO copying ImportExportXLS.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO copying ImportExportXLS.egg-info\entry_points.txt -> build\bdist.win32\egg\EGG-INFO copying ImportExportXLS.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist\ImportExportXLS-0.1-py2.4.egg' and adding 'build\bdist.win32\egg' to it removing 'build\bdist.win32\egg' (and everything under it)
Attachments (0)
Change History (7)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
comment:2 Changed 14 years ago by
sure, I tested it and compilation issue is solved. Loading the module results now in the following exception:
Traceback (most recent call last): File "build\bdist.win32\egg\trac\loader.py", line 68, in _load_eggs File "c:\python24\lib\site-packages\setuptools-0.6c11-py2.4.egg\pkg_resources.py", line 1954, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "build\bdist.win32\egg\importexportxls\__init__.py", line 1, in ? File "build\bdist.win32\egg\importexportxls\admin_ui.py", line 33, in ? ImportError: No module named io
xlwt 0.7.2 and xlrd 0.7.1 are installed properly as well.
comment:3 Changed 14 years ago by
I use io.ByteIO, but the module IO is available only from python 2.6 .
I'll test later with StringIO or cStringIO which must work too but available in python 2.4.
comment:4 Changed 14 years ago by
comment:5 Changed 14 years ago by
loading of plugin now works nicely and admin page shows. Now I face that the pulldowns for the custom fieldnames show 4 lines but novalues.
Further when I try to export my data I get the below exception:
Datei "build/bdist.win32/egg/trac/web/main.py", Zeile 517, in _dispatch_request Datei "build/bdist.win32/egg/trac/web/main.py", Zeile 238, in dispatch Datei "build/bdist.win32/egg/trac/admin/web_ui.py", Zeile 116, in process_request Datei "build/bdist.win32/egg/importexportxls/admin_ui.py", Zeile 119, in render_admin_panel Datei "build/bdist.win32/egg/importexportxls/admin_ui.py", Zeile 241, in _send_export Datei "build/bdist.win32/egg/importexportxls/admin_ui.py", Zeile 267, in _process_export Datei "C:/Python24/Lib/site-packages/xlwt/Workbook.py", Zeile 319, in add_sheet
comment:6 Changed 14 years ago by
I have add gestion for invalid XLS sheet name. By default it contains the project name, but it may be incompatible with sheet name constraints. [10217]
comment:7 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This works for me now. Thanks very much. :-)
I don't have time now for test it, but I think that python 2.4 does not accept class déclaration with "()" empty.
I have committed this correction, I'll test it later or you could test it for me?