﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
5373	UnicodeDecode Error on Categories creation	defect	0.11	Petr Škoda	new	2009-06-12T18:46:05+02:00	2012-02-03T00:00:34+01:00	"Hi,

here's a weird thing I'n getting when trying to add categories from Admin panel.

{{{
python2.5
Trac-0.11.1
PIL-1.1.6
py-clearsilver-0.10.4-1.3
PyCaptcha-0.4
TracDownloader-0.11
}}}

{{{
Traceback (most recent call last):
  File ""/usr/lib/python2.5/site-packages/trac/web/api.py"", line 339, in send_error
    'text/html')
  File ""/usr/lib/python2.5/site-packages/trac/web/chrome.py"", line 715, in render_template
    return stream.render(method, doctype=doctype)
  File ""/var/lib/python-support/python2.5/genshi/core.py"", line 179, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File ""/var/lib/python-support/python2.5/genshi/output.py"", line 60, in encode
    return _encode(u''.join(list(iterator)))
  File ""/var/lib/python-support/python2.5/genshi/output.py"", line 311, in __call__
    for kind, data, pos in stream:
  File ""/var/lib/python-support/python2.5/genshi/output.py"", line 753, in __call__
    for kind, data, pos in stream:
  File ""/var/lib/python-support/python2.5/genshi/output.py"", line 592, in __call__
    for kind, data, pos in stream:
  File ""/var/lib/python-support/python2.5/genshi/output.py"", line 707, in __call__
    text = mjoin(textbuf, escape_quotes=False)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1515: ordinal not in range(128)
}}}"	xavierT
11116	TypeError: not all arguments converted during string formatting	defect	0.12	Petr Škoda	new	2013-05-24T08:46:59+02:00	2013-05-24T16:56:48+02:00	"==== How to Reproduce ====

While doing a GET operation on `/admin/general/downloader`, Trac issued an internal error.

''(please provide additional details here)''

Request parameters:
{{{
{'cat_id': u'general',
 'page': 1,
 'page_part': 'files',
 'panel_id': u'downloader',
 'path_info': None}
}}}

User agent: `Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0`

==== System Information ====
|| '''`Trac`''' || `0.12.1` ||
|| '''`Babel`''' || `0.9.5` ||
|| '''`Genshi`''' || `0.6` ||
|| '''`mod_python`''' || `3.3.1` ||
|| '''`psycopg2`''' || `2.2.2` ||
|| '''`Pygments`''' || `1.3.1` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Jul  5 2010, 11:47:21) ` [[br]] `[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]]` ||
|| '''`pytz`''' || `2010h` ||
|| '''`setuptools`''' || `0.6c11` ||
|| '''`Subversion`''' || `1.6.9 (r901367)` ||
|| '''`jQuery`''' || `1.4.2` ||

==== Enabled Plugins ====
|| '''`cc-selector`''' || `0.0.3dev` ||
|| '''`PrivateWikis`''' || `1.0.0` ||
|| '''`SvnAuthzAdminPlugin`''' || `0.1.2.-Moved.to.Trac.0.11-` ||
|| '''`TicketExtPlugin`''' || `0.3.2` ||
|| '''`TracAccountManager`''' || `0.3.2` ||
|| '''`TracActiveDirectoryAuth`''' || `0.2.2` ||
|| '''`TracCustomFieldAdmin`''' || `0.2.8-r11265` ||
|| '''`TracDateField`''' || `1.0.1` ||
|| '''`TracDownloader`''' || `0.1` ||
|| '''`TracPrivateTickets`''' || `2.0.2` ||
|| '''`TracTags`''' || `0.6` ||
|| '''`TracWysiwyg`''' || `0.12.0.3-r9676` ||
|| '''`WorkflowEditorPlugin`''' || `1.1.5-r10055` ||

==== Python Traceback ====
{{{
Traceback (most recent call last):
  File ""/usr/lib/python2.6/site-packages/trac/web/main.py"", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/usr/lib/python2.6/site-packages/trac/web/main.py"", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/usr/lib/python2.6/site-packages/trac/admin/web_ui.py"", line 121, in process_request
    path_info)
  File ""build/bdist.linux-i686/egg/tracdownloader/admin.py"", line 142, in process_admin_request
    template = self._serve_files_admin(req)
  File ""build/bdist.linux-i686/egg/tracdownloader/admin.py"", line 187, in _serve_files_admin
    render_downloads_table(self.env, req)
  File ""build/bdist.linux-i686/egg/tracdownloader/model.py"", line 167, in render_downloads_table
    files_obj, files_list = release.get_files()
  File ""build/bdist.linux-i686/egg/tracdownloader/model.py"", line 532, in get_files
    ""ORDER BY sort, name"", (str(self.id,)))
  File ""/usr/lib/python2.6/site-packages/trac/db/util.py"", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
TypeError: not all arguments converted during string formatting
}}}"	daikuei
3029	TracDownloader with TracTags problem?	defect	0.11	Petr Škoda	assigned	2008-05-14T17:21:25+02:00	2018-04-15T17:18:28+02:00	"I downloaded the code. I installed it using ""python setup.py install"" command. I thank all was fine but each time I connect to the trac home page I got the error :

Traceback (most recent call last):
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/api.py"", line 339, in send_error 'text/html')
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/chrome.py"", line 684, in render_template data = self.populate_data(req, data)
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/chrome.py"", line 592, in populate_data d['chrome'].update(req.chrome)
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/api.py"", line 168, in __getattr__ value = self.callbacks[name](self)
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/util/compat.py"", line 130, in newfunc return func_(*(args + fargs), **dict(kwargs, **fkwargs))
File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/chrome.py"", line 460, in prepare_request for category, name, text in contributor.get_navigation_items(req):
File ""build/bdist.linux-i686/egg/tracdownloader/web_ui.py"", line 53, in get_navigation_items LookupError: unknown encoding: /projects/project/downloader

In fact, TracDownloader was already installed. I got that error after the installation of TracTags. Is there a link?

I don't know python at all. What I can see is that the error is there:
    def get_navigation_items(self, req):
        """"""Downloader isinstance visible if user hasattr got permission """"""
        if req.perm.has_permission('DOWNLOADER_DOWNLOAD'):
            yield 'mainnav', 'downloader', Markup('<a href=""%s"">Downloader</a>',
                                             self.env.href.downloader())

I can confirm that because if I remove the DOWNLOADER_DOWNLOAD permission, that's better!

Any idea? Thanks.

"	Jean-Yves Jourdain
2682	temporarily disable files/groups	enhancement	0.10	Petr Škoda	assigned	2008-03-04T17:37:51+01:00	2008-03-11T20:04:39+01:00	"How about temporarily disable downloads? Background: Imagine multiple developers delivering their downloads, which have dependencies to the other downloads of the same group. So one could disable the group for download until all files are complete. Another case: A single file should be disabled because there are some (temporary) issues e.g. concerning copyrights, which came up after the download was added and need to be checked.

The whole thing could be realized by a checkbox. Of course, this would need an additional database field."	izzy
5553	SQL Syntax from plugin will be broken if MySQL is used	enhancement	0.11	Petr Škoda	new	2009-07-24T15:48:54+02:00	2016-12-05T00:15:42+01:00	"Hi there if you use MySQL with Trac and this plugin all the SQL syntax will be broken and needs to be changed.

For example:
{{{
#!python
cursor.execute(""SELECT id, name, notes, sort, timestamp, deleted ""
               ""FROM downloader_category ""
               ""WHERE id = %s"", (id,))
}}}

This will break near `id = %s` because you need to specify the table where ID resides. Something like this:

{{{
#!python
cursor.execute(""SELECT id, name, notes, sort, timestamp, deleted ""
               ""FROM downloader_category ""
               ""WHERE downloader_category.id = %s"", (id,))
}}}

I have changed all the syntax and now works ok."	RaduM
2680	Reset Statistics for a given file	enhancement	0.10	Petr Škoda	assigned	2008-03-04T14:01:04+01:00	2008-03-12T09:23:45+01:00	It would be nice to have the possibility to reset statistics for a given file. I thought of an additional button on the admin pages when editing a files properties.	izzy
2681	Replace file	enhancement	0.10	Petr Škoda	assigned	2008-03-04T14:03:59+01:00	2008-03-11T23:49:56+01:00	"It would be nice to have the possibility to replace files. This should be done on the admin pages when editing a files properties, and could be realized by adding a file input, introduced by ""Replace file:""."	izzy
10238	Plugin causing HTMLParseError	defect	0.11	Petr Škoda	new	2012-08-07T12:17:35+02:00	2012-08-07T12:17:35+02:00	"Happens when I attempt to access the ""Downloader"" tab.

Trac detected an internal error:
HTMLParseError: bad end tag: '</p.<a id=""logo"" href="""">', at line 15, column 33

This only happens when I try to access the Downloader Plugin, all other plugins/pages work fine.

Trac version -  0.11.2.1
"	anonymous
2620	patch for limiting upload file size	enhancement	0.11	Petr Škoda	assigned	2008-02-22T09:54:54+01:00	2008-03-04T17:29:55+01:00	Small patch which adds file size limiting.	Mario
4847	large patch: postgres fixes, upgrade fixes, more	defect	0.11	Petr	new	2009-03-28T19:31:18+01:00	2009-03-29T00:25:22+01:00	postgres fixes, redo the setup participant class, get rid of globals, fix admin panels to work with themed sites, etc.  the user pages do not yet work with themed pages.  I had intended to convert to genshi, but haven't got to it yet.	Shane Caraveo
10725	Incompatible with Trac 1.0	defect	1.0	Petr Škoda	new	2012-12-25T06:24:53+01:00	2012-12-25T16:02:55+01:00	"Plug-in is incompatible with the current stable release of Trac. It is mentioned on the project page that even 0.11 had issues, but under 1.0 it completely fails.


This is a shame as (based on available screenshots) the functionality is far superior to the ""!TracDownloads"" plugin. Being able to associate multiple files t0 a given release version, with attractive organization on the download page for example.


When first enabling the plugin, the following warning is displayed:

 Warning: Error with navigation contributor ""!DownloaderModule"" 


Then when attempting to browse to the !WebAdmin page to configure the plugin, the following error is displayed:

 Trac detected an internal error:

!AttributeError: hdf


Here's the Python Traceback
Most recent call last:
{{{
    File ""/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/main.py"", line 497, in _dispatch_request
    File ""/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/main.py"", line 214, in dispatch
    File ""/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/admin/web_ui.py"", line 130, in process_request
    File ""/usr/lib/python2.6/site-packages/TracDownloader-0.1-py2.6.egg/tracdownloader/admin.py"", line 130, in process_admin_request
    File ""/usr/lib/python2.6/site-packages/TracDownloader-0.1-py2.6.egg/tracdownloader/model.py"", line 63, in file_directory_check
    File ""/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/api.py"", line 307, in __getattr__ 
}}}

System Information:
{{{
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0
Trac 	1.0
Genshi 	0.6 (without speedups)
GIT 	1.7.11.3
pysqlite 	2.4.1
Python 	2.6.8 (unknown, Nov 7 2012, 14:47:34) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
setuptools 	0.6
SQLite 	3.3.6
Subversion 	1.7.7 (r1393599)
jQuery	1.7.2
}}}

Note: system is RHEL 5 (CentOS 5) with Python 2.6 RPMs"	sc@…
2683	If a file/category was deleted, statistics are still shown for it	enhancement	0.10	Petr Škoda	assigned	2008-03-04T20:12:59+01:00	2008-12-22T12:17:58+01:00	I deleted one file and a duplicate category. In the statistics, both are still shown. Could it be the downloader_downloaded table is forgotten to update then (maybe even intentionally)? This could be counted a feature (to see historical statistics even if the stuff doesn't occupy any disk space anymore); but it should at least be possible to let the user decide whether to delete associated statistics as well (e.g. by asking for this after the delete button was pressed - if it is just a checkbox, one may forget to check it, and afterwards there is no chance any more).	izzy
2660	Files download with html appended to the end of them	defect	0.11	Petr Škoda	assigned	2008-02-29T19:53:52+01:00	2008-03-03T23:17:17+01:00	"I have TracDownloader installed on Windows 2003 Server, Apache 2.0.59  , Trac 0.11b1, python v2.4.

Whenever a file is downloaded with TracDownloader, it looks as if the file downloaded fine but there is HTML appended to the end of it.  I've attached the html that gets appended to the file.

I've also attached the Apache Error log.

Right now I get around this by zipping the file. (the zip file still opens ok even though it has extra data appended to it).

Here's the URL to my trac page..
http://www.stellar-sat.net:5230/trac_projects/PosRptAppV3/

Another problem that may or not be related is that the data from the last person to fill out the questionaire is still there for the next person who downloads a file."	Kelly Norton
3458	File names have extra characters causing IE to treat files as HTML	defect	0.11	Petr Škoda	new	2008-07-25T15:51:25+02:00	2008-07-25T15:51:25+02:00	"Trac version is 0.11b2

When Using the Downloader under Firefox, clicking to download or using ""save as"" works just as it should.  However, under IE6 or IE7, there are extra characters in the file names.  Example:  Patch0001.​ssios  The ""Box"" is not supposed to be in there.

Firefox treats this file as a binary (it is a self extracting archive, so part text, part binary).  IE seems to have decided that it is an HTML file.  Other files are treated correctly (.iso for example).

In some cases, this is causing IE to treat the file as an html file.  The user would have to ""right click, save as, then add in the extension to the file name.  Unfortunately, this could also be the way the IE browsers are configured here.  (I don't have any control over the windows systems, only the linux ones).

The issue of how the browser treats the files may not be something that can be addressed, but the problem with putting ""boxes"" or other characters in the file names is also a problem for the people who are downloading theses files.

I have a attached a screen shot."	andrew.simpson@…
2811	error while loading large file	defect	0.11	Petr Škoda	assigned	2008-03-28T03:54:44+01:00	2012-02-03T01:07:50+01:00	"Downloader seems to be working fantastically on smaller files (<20mb) but dies on my primary release package (~500mb). Not neccesarily sure it's downloader dependent but ideas on how to get around/improve downloader to be able to handle files of this size would be greatly appreciated.
{{{
Server 2k3, XAMP (Apache 2.2) Trac .11dev and here's the output from the log:

2008-03-27 19:45:06,302 Trac[chrome] DEBUG: Prepare chrome data for request
2008-03-27 19:45:06,349 Trac[session] DEBUG: Retrieving session for ID 'ijones'
2008-03-27 19:45:06,365 Trac[session] DEBUG: Retrieving session for ID 'ijones'
2008-03-27 19:45:06,552 Trac[main] DEBUG: 475 unreachable objects found.
2008-03-27 19:45:06,599 Trac[main] DEBUG: 384 unreachable objects found.
2008-03-27 19:45:18,459 Trac[main] DEBUG: Dispatching <Request ""POST u'/admin/general/downloader/files/release/1'"">
2008-03-27 19:45:18,474 Trac[main] ERROR: 
Traceback (most recent call last):
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\web\main.py"", line 417, in _dispatch_request
    dispatcher.dispatch(req)
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\web\main.py"", line 164, in dispatch
    if handler.match_request(req):
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\admin\web_ui.py"", line 75, in match_request
    req.args['cat_id'] = match.group(1)
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\web\api.py"", line 168, in __getattr__
    value = self.callbacks[name](self)
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\web\api.py"", line 444, in _parse_args
    fs = cgi.FieldStorage(fp, environ=self.environ, keep_blank_values=True)
  File ""C:\Python25\lib\cgi.py"", line 534, in __init__
    self.read_multi(environ, keep_blank_values, strict_parsing)
  File ""C:\Python25\lib\cgi.py"", line 657, in read_multi
    headers = rfc822.Message(self.fp)
  File ""C:\Python25\lib\rfc822.py"", line 104, in __init__
    self.readheaders()
  File ""C:\Python25\lib\rfc822.py"", line 151, in readheaders
    line = self.fp.readline()
  File ""c:\python25\lib\site-packages\trac-0.11dev_r6750-py2.5.egg\trac\web\modpython_frontend.py"", line 46, in readline
    return self.req.readline(size)
MemoryError
2008-03-27 19:45:18,474 Trac[chrome] DEBUG: Prepare chrome data for request
2008-03-27 19:45:18,490 Trac[session] DEBUG: Retrieving session for ID 'ijones'
2008-03-27 19:45:18,552 Trac[main] DEBUG: 441 unreachable objects found.
}}}"	ian.trac@…
4829	error when running trac-admin upgrade	defect	0.11	Petr Škoda	new	2009-03-24T23:18:01+01:00	2009-03-24T23:18:01+01:00	"It seems like the tables are not created right. I'm using Trac 0.11.2 and sqllite
{{{
Traceback (most recent call last):
  File ""/usr/bin/trac-admin"", line 8, in <module>
    load_entry_point('Trac==0.11.2', 'console_scripts', 'trac-admin')()
  File ""/usr/lib/python2.5/site-packages/trac/admin/console.py"", line 1294, in run
    return admin.onecmd(command)
  File ""/usr/lib/python2.5/site-packages/trac/admin/console.py"", line 123, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File ""/usr/lib/python2.5/cmd.py"", line 219, in onecmd
    return func(arg)
  File ""/usr/lib/python2.5/site-packages/trac/admin/console.py"", line 1144, in do_upgrade
    self.__env.upgrade(backup=do_backup)
  File ""/usr/lib/python2.5/site-packages/trac/env.py"", line 449, in upgrade
    participant.upgrade_environment(db)
  File ""build/bdist.linux-i686/egg/tracdownloader/admin.py"", line 704, in upgrade_environment
  File ""build/bdist.linux-i686/egg/tracdownloader/db.py"", line 83, in upgrade_environment
  File ""/usr/lib/python2.5/site-packages/trac/db/util.py"", line 51, in execute
    return self.cursor.execute(sql)
  File ""/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py"", line 58, in execute
    args or [])
  File ""/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py"", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
pysqlite2.dbapi2.OperationalError: near ""release"": syntax error
}}}"	benjamin
4214	Downloader broken on postgres 8.3 - integer to string cast	defect	0.11	Petr Škoda	new	2008-12-05T08:55:02+01:00	2012-07-11T12:30:12+02:00	"The downloader seems to be broken on trac instances run w/ postgres as the backend. I have experienced the following issues:

{{{
 Trac detected an internal error:

OperationalError: ERROR:  operator does not exist: text = integer
LINE 1: SELECT id FROM downloader_release WHERE category=2 AND delet...
                                                        ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.


File ""/usr/lib/python2.5/site-packages/trac/web/main.py"", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File ""/usr/lib/python2.5/site-packages/trac/web/main.py"", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File ""/usr/lib/python2.5/site-packages/trac/admin/web_ui.py"", line 118, in process_request
  path_info)
File ""build/bdist.linux-x86_64/egg/tracdownloader/admin.py"", line 141, in process_admin_request
 File ""build/bdist.linux-x86_64/egg/tracdownloader/admin.py"", line 186, in _serve_files_admin
File ""build/bdist.linux-x86_64/egg/tracdownloader/model.py"", line 133, in render_downloads_table
File ""build/bdist.linux-x86_64/egg/tracdownloader/model.py"", line 377, in get_releases
File ""/usr/lib/python2.5/site-packages/trac/db/util.py"", line 50, in execute
  return self.cursor.execute(sql_escape_percent(sql), args)
File ""/usr/lib/python2.5/site-packages/trac/db/util.py"", line 50, in execute
  return self.cursor.execute(sql_escape_percent(sql), args)
File ""/usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py"", line 3111, in execute
  raise OperationalError, msg

}}}
The problem is that the ''category'' column in '''downloader_release''' table has an incorrect type. Maybe, it should be fixed globally and column datatype should be changed to 'integer'.
The same issue occurs when accessing the '''downloader_file''' table on ''release'' column.

I am attaching a temporary fix that explicitely converts the id's used in select to strings, so that the value gets enclosed into quotes when generating the sql query. Postgres won't do any implicit casts anymore.

Thanks,

Jan
"	jen@…
2968	data leakage between users	defect	0.11	Petr Škoda	assigned	2008-04-29T12:57:19+02:00	2012-02-02T23:56:59+01:00	"This is a periodic one and is probably only applicable to mod_python (and possibly FCGI) installations but all versions of trac.

Basically, when creating a DownloadData object, it initializes self.schema to the form_data.quest_form object.  This is only a reference though.  As the code sets values in self.schema, it is also setting them in the global form_data.quest_form.  When a different user's request is handled by the same mod_python process, their form data is now prefilled with the data entered by the last user that was served by that process.  Unfortunately, this can include sensitive information.

My solution was to import copy and then change the assignment in init to a deepcopy operation.
{{{
#!python
   self.schema = copy.deepcopy(form_data.quest_form)
}}}"	Brett
4041	Add possibility to see the datetime of file or datetime of upload.	enhancement	0.11	Petr Škoda	new	2008-11-06T10:50:59+01:00	2008-11-06T10:50:59+01:00	"That is a very useful feature to add new fields like ""Upload Time"" or ""File creation time"". 
Those fields are very useful and important in every ""Downloader"" 

"	BKV
