Opened 16 years ago
Closed 16 years ago
#4502 closed defect (invalid)
Error when posting
Reported by: | Owned by: | Radek Bartoň | |
---|---|---|---|
Priority: | normal | Component: | DiscussionPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 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 self.add_headers(msg, headers); File "/var/lib/python-support/python2.4/trac/notification.py", line 236, in add_headers msg[h] = self.encode_header(h, headers[h]) File "/var/lib/python-support/python2.4/trac/notification.py", line 275, in encode_header return self.format_header(key, value) File "/var/lib/python-support/python2.4/trac/notification.py", line 225, in format_header tmp = name.encode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128)
Attachments (0)
Change History (12)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:2 follow-up: 3 Changed 16 years ago by
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 Changed 16 years ago by
Replying to 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?
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 16 years ago by
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 Changed 16 years ago by
Replying to 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:9 Changed 16 years ago by
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 16 years ago by
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 16 years ago by
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 16 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
If you were used an egg it would be in its name...
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.