# Ticket #2755 (closed defect: fixed)

Opened 5 years ago

## Problem with the Installation of Estimator Plugin

Reported by: Assigned to: nagaraju.mudireddy@gmail.com bobbysmith007 high EstimatorPlugin major 0.10

### Description

After downloading and installing estimator plugin, the tract shown an displayed message like The Trac Environment needs to be upgraded. and when i m trying to upgrade trac using trac-admin /home/svn/myproject upgrade it shows the following error Command failed: unsupported operand type(s) for &=: 'bool' and 'OperationalError?' so please help in this regard, how can i overcome above problem Thanks[BR]]

## Change History

### (follow-up: ↓ 2 ) 03/18/08 15:58:44 changed by bobbysmith007

Please turn on TracLogging and repeat the process. Then post your log on this ticket. (Just the parts where the errors are is fine). I grepped the code for usages, of &= and was unable to find any place I am using it. Is it possible that there is another plugin causing this problem?

### (in reply to: ↑ 1 ) 03/18/08 16:41:50 changed by anonymous

Please turn on TracLogging and repeat the process. Then post your log on this ticket. (Just the parts where the errors are is fine). I grepped the code for usages, of &= and was unable to find any place I am using it. Is it possible that there is another plugin causing this problem?

after installing estimator plugin, system asked to upgrade, we have performed the following commaind
while upgrading we are getting an errror : Command failed: unsupported operand type(s) for &=: 'bool' and 'OperationalError??'

and the output in error log is following

Trac[loader] DEBUG: Loading egg plugin estimatorplugin from /home/svn/trac/venturia/plugins/estimatorplugin-0.0.3-py2.5.egg Trac[api] DEBUG: Estimator needs upgrade? True [installed version:None pluginversion:1 Trac[env] WARNING: Component <estimatorplugin.api.EstimatorSetupParticipant? object at 0x9461bcc> requires environment upgrade Trac[api] DEBUG: Estimator needs upgrade? True [installed version:None pluginversion:1 Trac[api] DEBUG: Estimator about to upgrade from ver:None Trac[api] DEBUG: Creating Estimate and Estimate_Line_Item tables (Version 1) Trac[dbhelper] ERROR: There was a problem executing sql:CREATE TABLE estimate(

id integer PRIMARY KEY, rate DECIMAL, variability DECIMAL, communication DECIMAL, tickets VARCHAR(512), comment VARCHAR(8000)

)

with parameters:[]

Before installing estimator plugin we have installed Timing and Estimation Plugin, if this the problem how can i over come it, even i was tried uninstalling Timing and Estimation Plugin

### 03/18/08 17:01:40 changed by tsidhuus@yahoo.com

Just to add some background. We installed the T&E plugin, and noticed we did not get "Estimate" on the menu bar (similar to what you have on the demo site).

Therefore we tried to install this plugin on top.

Does the T&E plugin provide the functionality of the Estimator Plugin, if so how do we enable "Estimate" on the menu bar?

Tony

### 03/18/08 18:06:44 changed by anonymous

after installing estimator plugin, system asked to upgrade, we have performed the following commaind trac-admin /home/svn/trac/venturia upgrade while upgrading we are getting an errror : Command failed: unsupported operand type(s) for &=: 'bool' and 'OperationalError???'

and the output in error log is following

Trac[loader] DEBUG: Loading egg plugin estimatorplugin from /home/svn/trac/venturia/plugins/estimatorplugin-0.0.3-py2.5.egg Trac[api] DEBUG: Estimator needs upgrade? True [installed version:None pluginversion:1 Trac[env] WARNING: Component <estimatorplugin.api.EstimatorSetupParticipant?? object at 0x9461bcc> requires environment upgrade Trac[api] DEBUG: Estimator needs upgrade? True [installed version:None pluginversion:1 Trac[api] DEBUG: Estimator about to upgrade from ver:None Trac[api] DEBUG: Creating Estimate and Estimate_Line_Item tables (Version 1) Trac[dbhelper] ERROR: There was a problem executing sql:CREATE TABLE estimate(

id integer PRIMARY KEY, rate DECIMAL, variability DECIMAL, communication DECIMAL, tickets VARCHAR(512), comment VARCHAR(8000)

)

with parameters:[]

Before installing estimator plugin we have installed Timing and Estimation Plugin, if this the problem how can i over come it, even i was tried uninstalling Timing and Estimation Plugin

### 03/18/08 18:41:10 changed by bobbysmith007

These two are separate projects, trying to accomplish slightly different things. EstimatorPlugin was written Well after TimingandEstimationPlugin? and provides the "Estimate" menu item which allows construction of in-depth estimates. Timing and estimation plugin provides the "Estimated Hours" field to tickets.

It sounds like estimator did not properly install itself. In order to remove it completely, you will need to run sqlite (assuming you are using that) against the trac database and then tell it to drop the tables that it is complaining about.

sqlite3 /Path/to/TRACInstance/db/trac.db 'drop table estimate'


### 03/18/08 18:43:21 changed by bobbysmith007

oops, meant to preview. Continuing...

Once you have that cleared up, you should be able to upgrade the plugin and have that go successfully. I am not sure what caused the initial problem, since we do not have a log for that point in time. Make sure that you keep the log rolling so that if we have any more issues, we can track them down.

HTH,

RUss

### 03/18/08 18:46:19 changed by bobbysmith007

Ps. I didnt mean to imply that that was all timing and estimation plugin does. It also provides the "Billing" menu item and all of those reports. It also has a ticket change watcher to accumulate hours for you.

### 03/18/08 19:10:32 changed by tsidhuus@yahoo.com

Thanks, will give dropping the table and resinstalling a go tomorrow. The individuals doing the install are located in India. Will update ticket with results

### 03/18/08 19:35:08 changed by bobbysmith007

ok, depending on how far estimator got before it failed, you may also need to drop estimate_line_item.

### 03/19/08 05:41:31 changed by nagaraju

even after droping two tables estimate and estimate_line_item tables, running upgrade command giving error as
get_system_value() takes exactly 2 arguments (1 given)

if i am running upgrade command again the error is changed and displayed old error as
Command failed: unsupported operand type(s) for &=: 'bool' and 'OperationalError'

please see the attached log file.

My System versions are:
fedora - 7
trac - 10.4
python 2.5
sqlite 3.3.13

### 03/19/08 05:44:35 changed by nagaraju

trac.log file; problem with installing estimator plugin

### 03/19/08 07:41:31 changed by nagaraju.mudireddy@gmail.com

Thanks finally i have installed the plugin.

The following changes i have done.
i have edited the dbhelper.py file at 114 line

i changed get_system_value(key): to if get_system_value(env, key):

after that i have reinstalled the plugin and its working fine.
please let me know whether i was correct or not. but the plugin is working fine as of now.

Thanks

### 03/19/08 16:21:39 changed by bobbysmith007

• status changed from new to closed.
• resolution set to fixed.

(In [3399]) closes #2755

Fixed a missed function in dbhelper when I added env back into all the function calls