Modify

Opened 18 years ago

Closed 17 years ago

Last modified 13 years ago

#1073 closed defect (invalid)

Cannot create blog post

Reported by: jfeid@… Owned by: John Hampton
Priority: normal Component: TracBlogPlugin
Severity: major Keywords: patch
Cc: Trac Release: 0.10

Description

Creating a new blog post entry, Trac responds with "Trac detected an internal error".

Python Traceback

Traceback (most recent call last): File "C:\Python24\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request dispatcher.dispatch(req) File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "build\bdist.win32\egg\tBlog\new_blog.py", line 108, in process_request File "build\bdist.win32\egg\tBlog\new_blog.py", line 147, in _new_blog_post File "build\bdist.win32\egg\tBlog\new_blog.py", line 221, in _render_editor File "build\bdist.win32\egg\tBlog\new_blog.py", line 231, in variable_substitution UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 17: ordinal not in range(128)

Plugins

  • Trac 0.10.3rc1
  • tracwebadmin 0.1.2dev-r4429
  • tractags 0.4
  • tblog 0.2.1dev-r1846

Attachments (0)

Change History (7)

comment:1 Changed 17 years ago by muelli@…

Could you update tBlog and provide the title and the text of the blog entry you want to post?

comment:2 Changed 17 years ago by John Hampton

Status: newassigned

Please do up date the blog plugin and try again. If it fails, paste the part of the entry with the non-ascii characters.

Since I haven't seen a response to comment:1 I'll close the ticket and worksforme in a few days if there is no response.

comment:3 Changed 17 years ago by jfeid@…

I'm sorry for the late answer.
I updated tBlog but, unfortunately, another error emerged. When I click on the year link on the calendar panel to show all the postings for the year, trac responds with the following error:

Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\tBlog\web_ui.py", line 235, in process_request
  File "build\bdist.win32\egg\tBlog\web_ui.py", line 268, in _generate_blog
  File "build\bdist.win32\egg\tBlog\web_ui.py", line 578, in _get_time_range
TypeError: unsupported operand type(s) for +=: 'datetime.datetime' and 'NoneType'

The initial error that started this ticket no longer happens. Should I create a new ticket for the new error? Environment:

 * Trac 0.10.4
 * tracwebadmin 0.1.2dev-r4429
 * tractags 0.4
 * tBlog 0.2.2dev

comment:4 Changed 17 years ago by anonymous

Keywords: patch added

Filing a new bug would be more appropriate. But thank you for your report anyway!

I can reproduce this issue, so it's a serious bug.

Would you please try following patch which works for me?

Index: tBlog/web_ui.py =================================================================== --- tBlog/web_ui.py (revision 2401) +++ tBlog/web_ui.py (working copy) @@ -564,7 +564,7 @@

defaults = not (startdate or enddate or delta or year or month or day) now = datetime.datetime.now() oneday = datetime.timedelta(days=1)

  • increment = None

+ increment = datetime.timedelta(days=0) # Increment nothing in first place

if year or month or day:

if day:

year = year or now.year

comment:5 Changed 17 years ago by jfeid@…

Patch works ok. Thank you. I filled a new ticket #1750.

comment:6 Changed 17 years ago by muelli@…

so is the original bug still valid?

If not please close as Invalid

comment:7 Changed 17 years ago by anonymous

Resolution: invalid
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Hampton.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.