Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1656 closed defect (fixed)

download in other formats causes error "Report instance has no attribute 'error'"

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone: 0.9
Component: ticket system Version: 0.8.2
Severity: major Keywords: ticket download error
Cc: chris.rule@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have a setup where I'm running:

  1. trac 0.8.2
  2. Subversion 1.1.4
  3. Windows XP
  4. Apache 2.43.
  5. ActivePython-2.3.5-236-win32-ix86.msi

Everything seems to be working OK except when I try to select the "download in other formats" option on a ticket. I get the error "Report instance has no attribute 'error'". I've looked at the python code and everything seems to be fine, but I really don't know enough Python to figure out what's going on.

There seems to be two problems:

  1. Selecting a "download in other formats" option produces the errors listed below.
  2. The error messages are dumped to the window as plain text.

Anyone have ideas on what's wrong?

Status: 500
Cache-control: no-cache
Expires: Fri, 01 Jan 1999 00:00:00 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3385

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
  <title>Oops - HLA_Logger - Trac</title>
  <style type="text/css">
   @import url(/trac/css/trac.css);
   
   

  </style>
  <script src="/trac/trac.js" type="text/javascript"></script>
 </head>
<body>


<div id="banner">

<div id="header">
  <a id="logo" href="http://trac.edgewall.com/"><img src="/trac/trac_banner.png"
      width="236" height="73"
      alt="Trac" /></a>
  <hr />
</div>

<form id="search" action="/projects/hlalogger/search" method="get">
 
</form>

<div id="metanav" class="nav">
 <h2>Navigation</h2>
 <ul>
  <li class="first">
    <a href="/projects/hlalogger/login">Login</a>
  </li>
  <li><a href="/projects/hlalogger/settings">Settings</a></li>
  <li><a accesskey="6" href="/projects/hlalogger/wiki/TracGuide">Help/Guide</a></li>
  <li style="display: none"><a accesskey="5" href="http://projects.edgewall.com/trac/wiki/TracFaq">FAQ</a></li>
  <li style="display: none"><a accesskey="0" href="/projects/hlalogger/wiki/TracAccessibility">Accessibility</a></li>
  <li class="last"><a accesskey="9" href="/projects/hlalogger/about_trac">About Trac</a></li>
 </ul>
</div>

</div>





<div id="mainnav" class="nav">
 <ul></ul>
</div>

<div id="main">


<div id="ctxtnav" class="nav"></div>

<div id="content" class="error">

 
  <h3>Oops...</h3>
  <div class="message">
   <strong>Trac detected an internal error:</strong>
   <pre>Report instance has no attribute 'error'</pre>
  </div>
  <p>
   If you think this really should work and you can reproduce it. Then you 
   should consider to report this problem to the Trac team.
  </p>
  <p>
   Go to <a href="http://trac.edgewall.com/">http://trac.edgewall.com/</a>  and create a new ticket where you describe
   the problem, how to reproduce it. Don't forget to include the python
   traceback found below.
  </p>

 

 <p>
  <a href="/projects/hlalogger/wiki/TracGuide">TracGuide</a>
  &mdash; The Trac User and Administration Guide
 </p>

 
  <h4>Python traceback</h4>
  <pre>Traceback (most recent call last):
  File &#34;C:\Python23\Lib\site-packages\trac\core.py&#34;, line 531, in cgi_start
    real_cgi_start()
  File &#34;C:\Python23\Lib\site-packages\trac\core.py&#34;, line 526, in real_cgi_start
    dispatch_request(path_info, args, req, env)
  File &#34;C:\Python23\Lib\site-packages\trac\core.py&#34;, line 441, in dispatch_request
    module.run()
  File &#34;C:\Python23\Lib\site-packages\trac\Module.py&#34;, line 46, in run
    disp()
  File &#34;C:\Python23\Lib\site-packages\trac\Report.py&#34;, line 447, in display_csv
    if self.error:
AttributeError: Report instance has no attribute 'error'
</pre>
 

</div>
<script type="text/javascript">searchHighlight()</script>



</div>

<div id="footer">
 <hr />
 <a id="tracpowered" href="http://trac.edgewall.com/"><img src="/trac/trac_logo_mini.png" height="30" width="107"
     alt="Trac Powered"/></a>
 <p class="left">
  Powered by <a href="/projects/hlalogger/about_trac"><strong>Trac 0.8.2</strong></a><br />
  By <a href="http://www.edgewall.com/">Edgewall Software</a>.
 </p>
 <p class="right">
  Visit the Trac open source project at<br /><a href="http://trac.edgewall.com/">http://trac.edgewall.com/</a>
 </p>
</div>



 </body>
</html>

Attachments (0)

Change History (3)

comment:1 by blum@…, 17 years ago

I've the same problem… can't find the solution

comment:2 by Matthew Good, 17 years ago

Milestone: 0.9
Resolution: fixed
Status: newclosed

Well, I believe that in the file Report.py you could add a line with "self.error = None" that would fix this.

I don't know if this issue was addressed in any of the 0.8.x versions, but with the refactoring for 0.9 this code is gone, so this is no longer an issue.

comment:3 by Matthew Good, 17 years ago

I meant to qualify that statement about adding the line to say that it should go at the beginning of the method "render".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.