Opened 8 years ago

Closed 8 years ago

# Error when posting

Reported by: Owned by: peephill@… Blackhex normal DiscussionPlugin normal 0.10

### Description

I was just creating a test topic with title "Problema com código CID" and got the error "'ascii' codec can't decode byte 0xc3 in position 37".

DiscussionPlugin v0.5

Python Traceback

Traceback (most recent call last):
File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/var/lib/python-support/python2.4/trac/web/main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 75, in process_request
File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 32, in render_discussion
File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 547, in _do_action
File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 91, in notify
File "/var/lib/python-support/python2.4/trac/notification.py", line 216, in notify
Notify.notify(self, resid)
File "/var/lib/python-support/python2.4/trac/notification.py", line 115, in notify
self.send(torcpts, ccrcpts)
File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 132, in send
File "/var/lib/python-support/python2.4/trac/notification.py", line 360, in send
tmp = name.encode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128)


### comment:1 Changed 8 years ago by Blackhex

• Status changed from new to assigned

Thanks for reporting. I'll look at that later. It would be great if you can check if you are experiencing same problem with 0.11 branch of the plugin. But only if it is not much problematic to you. Thank you.

### comment:2 follow-up: ↓ 3 Changed 8 years ago by Blackhex

As I studied the code, it should not be related to diacritics used in topic title. The line of error sets topic URL to notification e-mail header. So, can you confirm that your server has URL with non-ASCII characters and this happens everytime you create topic or message?

### comment:3 in reply to: ↑ 2 Changed 8 years ago by anonymous

As I studied the code, it should not be related to diacritics used in topic title. The line of error sets topic URL to notification e-mail header. So, can you confirm that your server has URL with non-ASCII characters and this happens everytime you create topic or message?

The server's URL I'm using has only ASCII chars.
I just get the error when trying to post a topic wich title has diacritics. The usage in message corpus has no effects. There is a curious fact: if I remove the problematic chars from the title, post the topic, and edit the title using the critical chars as before, the post is correctly updated.

### comment:4 follow-up: ↓ 5 Changed 8 years ago by anonymous

As I checked the code again, there is not called notify method on line 91 in notification.py in 0.10 branch at lastest revision. I don't know where a looked before that I didn't notice that... What branch and revision are you using exactly?

### comment:5 in reply to: ↑ 4 Changed 8 years ago by anonymous

As I checked the code again, there is not called notify method on line 91 in notification.py in 0.10 branch at lastest revision. I don't know where a looked before that I didn't notice that... What branch and revision are you using exactly?

0.10.3

### comment:7 follow-up: ↓ 8 Changed 8 years ago by anonymous

The plugin version is 0.5

### comment:8 in reply to: ↑ 7 Changed 8 years ago by anonymous

The plugin version is 0.5

Branch 0.10

### comment:9 Changed 8 years ago by anonymous

I don't want to be annoying but I need to identify which source code revision are you really using to identify what code is causing the error. In other words I need to know what is code of your DiscussionPlugin installation exactly. Lastest revision of 0.10 branch is r3464 which is apparently not yours because line numbers don't match.

Anyway, it would be better, if you install plugin from lastest revision and send me backtrace and relevant part of debug log, if you manage to evoke error aggain. It also may be possible that lastest revsion has this fixed. It's long time I've been modifying 0.10 branch and I don't remember much about it. If you need info about logging and bug reporting see: TracLogging and BugReporting.

### comment:10 Changed 8 years ago by anonymous

I'm sorry about the poor info. I'm not the server administrator and as soon as I get the version and revision I'll put it here.

### comment:11 Changed 8 years ago by anonymous

We have installed the latest revision of 0.10 branch and I get no more errors :)

I don't know what revision was being used before, the admin didnt find that information. About that, I've written a suggestion in the #4662

### comment:12 Changed 8 years ago by anonymous

• Resolution set to invalid
• Status changed from assigned to closed

If you were used an egg it would be in its name...