Opened 7 years ago

Closed 7 years ago

#2381 closed defect (fixed)

0.11b1 + te plugin error

Reported by: artur.kwiatkowski@… Owned by: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


hi there, just wanted to install the plugin but on my trac 0.11b1 after running: python bdist_egg it gives:

byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to reports.pyc
byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to api.pyc
byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to tande_filters.pyc
  File "build/bdist.linux-i686/egg/timingandestimationplugin/", line 16
    self.billing_reports = set(x[0] for x in cur.fetchall())
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to reportmanager.pyc
byte-compiling build/bdist.linux-i686/egg/timingandestimationplugin/ to webui.pyc

the .egg package will be created but after the enabling in project conf and install to plugins dir when i run upgrade on the project env it gives

Failed to open environment. invalid syntax (, line 16)
Traceback (most recent call last):
  File "/home/users/admin/system_tools/virtual-python/lib/python2.3/site-packages/Trac-0.11b1-py2.3.egg/trac/admin/", line 141, in env_open
    self.__env = Environment(self.envname)
  File "/home/users/admin/system_tools/virtual-python/lib/python2.3/site-packages/Trac-0.11b1-py2.3.egg/trac/", line 184, in __init__
    load_components(self, plugins_dir and (plugins_dir,))
  File "/home/users/admin/system_tools/virtual-python/lib/python2.3/site-packages/Trac-0.11b1-py2.3.egg/trac/", line 108, in load_components
    loadfunc(env, search_path, auto_enable=plugins_dir)
  File "/home/users/admin/system_tools/virtual-python/lib/python2.3/site-packages/Trac-0.11b1-py2.3.egg/trac/", line 65, in _load_eggs
  File "/home/users/admin/system_tools/virtual-python/lib/python2.3/site-packages/setuptools-0.6c7-py2.3.egg/", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-i686/egg/timingandestimationplugin/", line 1, in ?
  File "build/bdist.linux-i686/egg/timingandestimationplugin/", line 4, in ?
  File "/home/users/admin/dev/trac/projects/tigroup/plugins/timingandestimationplugin-0.5.9-py2.3.egg/timingandestimationplugin/", line 16
     self.billing_reports = set(x[0] for x in cur.fetchall())
 SyntaxError: invalid syntax

the same case is when im trying to install it for a single project and the same is when i try to install globally.

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by bobbysmith007

What version of python are you running. This is valid syntax in Python 2.4.4.

If you can provide the correct syntax to make it work in both systems, I am very much willing to go that route.

For Example:

set(i for i in [0,1,2,2,2,3,4])
# or
set([i for i in [0,1,2,2,2,3,4]])
# or
from sets import Set
Set(i for i in [0,1,2,2,2,3,4])
# or
Set([i for i in [0,1,2,2,2,3,4]])

All of these are equally valid ways of saying the same thing in the version of python that I am running. Also if you are running python <= 2.3 then there are some other problems that might arise. At some point I was using generator expressions, which were only available in Python > 2.4

Thanks for your help resolving this matter, Russ

comment:2 Changed 7 years ago by zalkind

I am having exactly the same error with python 2.5

comment:3 Changed 7 years ago by bobbysmith007

(In [3363]) re #2381

I have added a pair of square brackets, though I am not sure if this will fix you problem or not

comment:4 Changed 7 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

I guess fixed until it is re-reported?


Add Comment

Modify Ticket

as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.