Modify

Opened 17 years ago

Closed 17 years ago

#2015 closed defect (fixed)

installing tracmetrixplugin into trac

Reported by: Vudu12 Owned by: Bhuricha Deen Sethanandha
Priority: high Component: TracMetrixPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

installing tracmetrixplugin into trac... big error:

Trac:0.11dev-r5987, Python:2.5.1, setuptools:0.6c7, SQLite:3.4.0, pysqlite:2.3.5, Genshi:0.4.4, Subversion:1.4.4, jQuery:1.1.3.1

The plugin shows in Admin, and Dashboard shows, but clicking on it gives this (yes I have some tickets):

Oops… Trac detected an internal error:

ZeroDivisionError: float division

If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.

Otherwise, please ==== How to Reproduce ==== While doing a GET operation on /pdashboard, Trac issued an internal error. (please provide additional details here) Request parameters: {'imagename': None} ==== System Information ====
Trac 0.11dev-r5987 Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] setuptools 0.6c7 SQLite 3.4.0 pysqlite 2.3.5 Genshi 0.4.4 Subversion 1.4.4 (r25188) ==== Python Traceback ==== Traceback (most recent call last): File "c:\python25\lib\site-packages<WBR>\trac-0.11dev_r5987-py2.5.egg\trac<WBR>\web\main.py", line 381, in dispatch_request dispatcher.dispatch(req) File "c:\python25\lib\site-packages<WBR>\trac-0.11dev_r5987-py2.5.egg\trac<WBR>\web\main.py", line 191, in dispatch resp = chosen_handler.process_request<WBR>(req) File "build\bdist.win32\egg\tracmetr<WBR>ixplugin\web_ui.py", line 119, in process_request return self._render_view(req, db) File "build\bdist.win32\egg\tracmetr<WBR>ixplugin\web_ui.py", line 193, in _render_view daily_backlog_chart_path = tkt_group_metrics.get_daily<WBR>_backlog_chart(backlog_history) File "build\bdist.win32\egg\tracmetr<WBR>ixplugin\model.py", line 443, in get_daily_backlog_chart bmi_dataset.append(float<WBR>(closed_tickets_dataset[i])<WBR>*100/float(opened_tickets<WBR>_dataset[i])) ZeroDivisionError: float division a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.

Python Traceback Most recent call last:

  • File "c:\python25\lib\site-packages\trac-0.11dev_r5987-py2.5.egg\trac\web\main.py", line 381, in dispatch_request Code fragment:
    1. if not env and env_error:
    2. raise HTTPInternalError(env_error)
    3. try:
    4. try:
    5. dispatcher = RequestDispatcher(env)
    6. dispatcher.dispatch(req)
    7. except RequestDone:
    8. pass
    9. return req._response or []
    10. finally:
    11. if not run_once:
    Local variables: Name

Value

after

[' except RequestDone:', ' pass', ' ...

before

[' if not env and env_error:', ' raise ...

dispatcher

<trac.web.main.RequestDispatcher object at 0x0271B6B0>

e

ZeroDivisionError('float division',)

env

<trac.env.Environment object at 0x01622E70>

env_error

None

env_path

'C:
pywww
trac'

environ

{'wsgi.multiprocess': False, 'HTTP_REFERER': ...

exc_info

(<type 'exceptions.ZeroDivisionError'>, ZeroDivisionError('float ...

filename

'c:
python25
lib
site-packages
trac-0.11dev_r5987-py2.5.egg
trac
web\ ...

frames

[{'function': 'dispatch_request', 'lines_before': [' if not env and ...

has_admin

True

line

' dispatcher.dispatch(req)'

lineno

380

message

u'ZeroDivisionError: float division'

req

<Request "GET u'/pdashboard'">

run_once

False

script_url

None

start_response

<bound method ModPythonGateway._start_response of ...

tb

<traceback object at 0x02A7BC10>

tb_hide

None

traceback

'Traceback (most recent call last):\n File ...

  • File "c:\python25\lib\site-packages\trac-0.11dev_r5987-py2.5.egg\trac\web\main.py", line 191, in dispatch Code fragment:
    1. 'Do you have cookies enabled?')
    2. # Process the request and render the template
    3. try:
    4. try:
    5. resp = chosen_handler.process_request(req)
    6. if resp:
    7. if len(resp) == 2: # Clearsilver
    8. chrome.populate_hdf(req)
    9. template, content_type = \
    10. self._post_process_request(req, *resp)
    Local variables: Name

Value

chosen_handler

<tracmetrixplugin.web_ui.PDashboard object at 0x0271B730>

chrome

<trac.web.chrome.Chrome object at 0x0271B650>

err

(<type 'exceptions.ZeroDivisionError'>, ZeroDivisionError('float ...

handler

<tracmetrixplugin.web_ui.PDashboard object at 0x0271B730>

req

<Request "GET u'/pdashboard'">

self

<trac.web.main.RequestDispatcher object at 0x0271B6B0>

  • File "build\bdist.win32\egg\tracmetrixplugin\web_ui.py", line 119, in process_request Local variables: Name

Value

db

<trac.db.pool.PooledConnection object at 0x02A65DF0>

filename

None

req

<Request "GET u'/pdashboard'">

self

<tracmetrixplugin.web_ui.PDashboard object at 0x0271B730>

  • File "build\bdist.win32\egg\tracmetrixplugin\web_ui.py", line 193, in _render_view Local variables: Name

Value

backlog_history

(array([ 732893., 732894., 732895., 732896., 732897., 732898., ...

bmi_stats

[('9/2007', [6], [1, 3, 4, 5, 6], [], 0.0), ('8/2007', [1, 2, 3, 4, 5], ...

closed_stat

<trac.ticket.roadmap.TicketGroupStats object at 0x02A76CF0>

data

{'proj_closed_stat': {'stats_href': '/trac/query/%7B%7D', ...

db

<trac.db.pool.PooledConnection object at 0x02A65DF0>

first_day

datetime.datetime(2007, 8, 5, 0, 0, tzinfo=<FixedOffset "UTC" 0:00:00>)

interval

{'count': 1, 'title': u'worksforme', 'css_class': 'waste', 'countsToProg': ...

last_day

datetime.datetime(2007, 9, 5, 0, 0, tzinfo=<FixedOffset "UTC" 0:00:00>)

milestone

<trac.ticket.model.Milestone object at 0x02A76A70>

milestones

[<trac.ticket.model.Milestone object at 0x02A76AD0>, ...

proj_stat

<trac.ticket.roadmap.TicketGroupStats object at 0x02A76E90>

project

{'name': u'recondoqa', 'description': u'Recondo Trac tool'}

project_tickets

[1, 2, 3, 4, 5, 6]

queries

[]

req

<Request "GET u'/pdashboard'">

self

<tracmetrixplugin.web_ui.PDashboard object at 0x0271B730>

showall

False

stat

<trac.ticket.roadmap.TicketGroupStats object at 0x02A76E10>

stats

[{'stats_href': '/trac/query?group=status&milestone=Iteration+7', ...

tickets

[]

tkt_duration_stats

{'Lead time': <tracmetrixplugin.model.DescriptiveStats object at ...

tkt_frequency_stats

{'Number of milestone changed per ticket': ...

tkt_group_metrics

<tracmetrixplugin.model.TicketGroupMetrics object at 0x02A76EF0>

tkt_stats

{}

today

datetime.datetime(2007, 9, 5, 12, 55, 39, 718000)

  • File "build\bdist.win32\egg\tracmetrixplugin\model.py", line 443, in get_daily_backlog_chart Local variables: Name

Value

backlog_history

(array([ 732893., 732894., 732895., 732896., 732897., 732898., ...

backlog_stats

{'opened': [[], [], [], [], [], [], [], [], [], [], [], [1, 2, 3], [1, 3, ...

bmi_dataset

[]

closed_tickets_dataset

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...

created_tickets_dataset

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...

i

0

list

[6]

numdates

array([ 732893., 732894., 732895., 732896., 732897., 732898., ...

opened_tickets_dataset

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ...

self

<tracmetrixplugin.model.TicketGroupMetrics object at 0x02A76EF0>

File "c:\python25\lib\site-packages\trac-0.11dev_r5987-py2.5.egg\trac\web\main.py", line 381, in dispatch_request

dispatcher.dispatch(req)

File "c:\python25\lib\site-packages\trac-0.11dev_r5987-py2.5.egg\trac\web\main.py", line 191, in dispatch

resp = chosen_handler.process_request(req)

File "build\bdist.win32\egg\tracmetrixplugin\web_ui.py", line 119, in process_requestFile "build\bdist.win32\egg\tracmetrixplugin\web_ui.py", line 193, in _render_viewFile "build\bdist.win32\egg\tracmetrixplugin\model.py", line 443, in get_daily_backlog_chart

System Information:

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Trac: 0.11dev-r5987 Python: 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] setuptools: 0.6c7 SQLite: 3.4.0 pysqlite: 2.3.5 Genshi: 0.4.4 Subversion: 1.4.4 (r25188) jQuery: 1.1.3.1

Attachments (0)

Change History (3)

comment:1 Changed 17 years ago by Bhuricha Deen Sethanandha

Status: newassigned

Can you provide the local variables of the last call?

Do you setup Trac with SVN?

comment:2 Changed 17 years ago by Bhuricha Deen Sethanandha

I have fixed the problem I have found. Please use the trunk and let me know. If it did worked I will close this ticket.

comment:3 Changed 17 years ago by Bhuricha Deen Sethanandha

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Bhuricha Deen Sethanandha.
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.