📜 ⬆️ ⬇️

Trac Tags Bug Glitches - UnicodeEncodeError Error

Trac - project and documentation management


Trac is such a handy thing that allows you to create wiki-friendly documentation and manage a project. It has a ticket system for creating task plans, bug reports, or an improvement request. Trac can be tied to SVN, and SVN to it, it turns out a great bundle for governing code. In Svn, when fixing changes, we indicate the ticket number with a detailed description of the problem, and in Trac we write how this problem was solved.

Problem

Trac
I danced with a tambourine for two days, reinstalling Trac 0.11.3 many times, could not understand why the Tags plugin works fine in one project, and I get an error in another
UnicodeEncodeError: 'ascii' codec can't encode character


The quest for truth

At first I thought that this was due to tags in Russian, but in another project everything works fine.
The reinstallation and initialization of the project again with the subsequent installation of the Tags plugin did not give a positive result.

Bug In search of a solution, I found an article on this error in the Trac wiki. It explains that such problems can arise if the plugin incorrectly uses the Trac API, in other words, the plugin has strings left over from version 0.10 in which these errors could be caused by Trac itself, and in the 0.11 version, all problems in the kernel were fixed.
')
Eureka!

Trac supports unicode - that's great!
However, plug-ins to it do not undertake to fulfill this promise entirely. The Tags plugin turned out to be one of those.
I noticed that in my first project I called all the wiki pages with English words, however, in the second project I was bored with breaking the brain with a double translation, and I started writing the links as they were, i.e. instead
[wiki:SystemArchitecture ]
I began to use the declared support for unicode and began to write links just in Russian
[wiki:" "]
Wiki pages open fine, but
Tags goes crazy with non ascii characters in the page address.

The presence of non-ascii characters in the address of the wiki pages is why the Tags plugin refused to work.
After the change of Russian characters in the addresses of pages to Latin, the tags began to work, and the tags can already be specified in Russian.

Now, finally, you can easily use tags, and how well it is known to all.

Source: https://habr.com/ru/post/54801/


All Articles