Modify

Opened 11 years ago

Closed 11 years ago

#10903 closed defect (worksforme)

UnknownLocaleError: unknown locale 'datetime'

Reported by: andrkalashnikov@… Owned by: Christopher Paredes
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

How to Reproduce

While doing a POST operation on /version, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'062f6b129825fc377db2a4d1',
 'action': u'edit',
 'description': u'',
 'due': u'on',
 'id': u'',
 'name': u'1.0.0.3',
 'project': u'9',
 'save': u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c',
 'time': u'11.03.2013 9:31:15'}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0

System Information

Trac 1.0
Babel 0.9.6
Genshi 0.6 (without speedups)
mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
pysqlite 2.6.3
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
setuptools 0.6c12
SQLite 3.7.6.2
Subversion 1.7.5 (r1336830)
jQuery 1.7.2

Enabled Plugins

autocompleteusers 0.4.2dev
nevernotifyupdaterplugin 0.1.4
simplemultiproject 0.0.3dev
tracaccountmanager 0.3.2
tracticketchangesets 1.0dev

Python Traceback

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\simplemultiproject\version.py", line 108, in process_request
    return self._do_save(req, db, version)
  File "build\bdist.win32\egg\simplemultiproject\version.py", line 228, in _do_save
    version.time = time and parse_date(time, req.tz, 'datetime') or None
  File "build\bdist.win32\egg\trac\util\datefmt.py", line 474, in parse_date
    }.get(hint, lambda(l): hint)(locale)
  File "build\bdist.win32\egg\trac\util\datefmt.py", line 266, in get_date_format_hint
    format = get_date_format('medium', locale=locale)
  File "E:\TracStack\python\lib\site-packages\babel-0.9.6-py2.7.egg\babel\dates.py", line 135, in get_date_format
    return Locale.parse(locale).date_formats[format]
  File "E:\TracStack\python\lib\site-packages\babel-0.9.6-py2.7.egg\babel\core.py", line 212, in parse
    return cls(*parse_locale(identifier, sep=sep))
  File "E:\TracStack\python\lib\site-packages\babel-0.9.6-py2.7.egg\babel\core.py", line 137, in __init__
    raise UnknownLocaleError(identifier)
UnknownLocaleError: unknown locale 'datetime'

Attachments (0)

Change History (11)

comment:1 Changed 11 years ago by falkb

I cannot reproduce it. Please, tell me the exact steps for reproducing. I set my language to Russian, and added version "1.0.0.3" to a project "9" without problems. Also change and delete works for me.

comment:2 Changed 11 years ago by anonymous

Hello, Thank u for reply. The error is shown when I setup end time for version. When I add version without end time all is ok

comment:3 Changed 11 years ago by anonymous

Trac Release: 1.0

comment:4 Changed 11 years ago by falkb

OK, I removed that version again, but then: even if I also create a version '1.0.0.3' of project '9' dated to 11.03.2013 9:31:15, it works well. The version is created and it reports 'Ваши изменения сохранены. Версия 1.0.0.3 Date 7 дней (11.03.2013 9:31:15)'. No real idea anymore now.

Beside your Язык setting - what is your Дата и время setting? I use Default in all 3 comboboxes.

comment:5 Changed 11 years ago by anonymous

I set Дата и время setting to ISO8601 format and all is ok. But when it is setup to Browser's lnguage I've got this error

comment:6 Changed 11 years ago by anonymous

and WhatsApp

comment:7 Changed 11 years ago by anonymous

and what is your browser setting? I think that is the point.

comment:8 Changed 11 years ago by falkb

Again unable to reproduce. Perhaps, could you play around with the call at version.py line 238 and try variants of the Trac API suggests? Then report back what have helped for you.

comment:9 Changed 11 years ago by Jun Omae

It seems that you use simplemultiprojectplugin/trunk/simplemultiproject/version.py?rev=11780#L228. Please try the latest. I believe this issue has been fixed in r12453 and r12535.

comment:10 in reply to:  9 Changed 11 years ago by falkb

Replying to jun66j5:

It seems that you use simplemultiprojectplugin/trunk/simplemultiproject/version.py?rev=11780#L228. Please try the latest. I believe this issue has been fixed in r12453 and r12535.

Hi Andr K., did this help? I think jun66j5 is right.

comment:11 Changed 11 years ago by falkb

Resolution: worksforme
Status: newclosed

timeout

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Paredes.
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.