#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:
- trac 0.8.2
- Subversion 1.1.4
- Windows XP
- Apache 2.43.
- 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:
- Selecting a "download in other formats" option produces the errors listed below.
- 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>
— The Trac User and Administration Guide
</p>
<h4>Python traceback</h4>
<pre>Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\trac\core.py", line 531, in cgi_start
real_cgi_start()
File "C:\Python23\Lib\site-packages\trac\core.py", line 526, in real_cgi_start
dispatch_request(path_info, args, req, env)
File "C:\Python23\Lib\site-packages\trac\core.py", line 441, in dispatch_request
module.run()
File "C:\Python23\Lib\site-packages\trac\Module.py", line 46, in run
disp()
File "C:\Python23\Lib\site-packages\trac\Report.py", 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 , 20 years ago
comment:2 by , 20 years ago
| Milestone: | → 0.9 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
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 , 20 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".



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