Edgewall Software

Opened 12 years ago

Closed 12 years ago

#9107 closed defect (fixed)

Need more robust first time translation activation

Reported by: Christian Boos Owned by: Christian Boos
Priority: normal Milestone: 0.12
Component: i18n Version: 0.12dev
Severity: normal Keywords: setuptools
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


2010-02-28 20:38:21,356 Trac[env] INFO: -------------------------------- environment startup [Trac 0.12dev-r9313] --------------------------------
2010-02-28 20:38:22,199 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
2010-02-28 20:38:22,219 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 499, in _dispatch_request
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 196, in dispatch
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 343, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py", line 326, in pre_process_request
    if is_default(reponame):
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py", line 38, in is_default
    return not reponame or reponame in ('(default)', _('(default)'))
  File "build/bdist.linux-x86_64/egg/trac/util/translation.py", line 189, in gettext
    if not self.isactive:
  File "build/bdist.linux-x86_64/egg/trac/util/translation.py", line 178, in isactive
    self.activate(get_locale(), env_path)
  File "build/bdist.linux-x86_64/egg/trac/util/translation.py", line 141, in activate
    locale_dir = pkg_resources.resource_filename('trac', 'locale')
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 841, in resource_filename
    self, resource_name
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1311, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1318, in _extract_resource
    manager, os.path.join(zip_path, name)
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1318, in _extract_resource
    manager, os.path.join(zip_path, name)
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1318, in _extract_resource
    manager, os.path.join(zip_path, name)
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1332, in _extract_resource
    self.egg_name, self._parts(zip_path)
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 921, in get_cache_path
  File "/usr/local/virtualenv/trunk/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 887, in extraction_error
    raise err
ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg

  [Errno 17] File exists: '/tmp/.lighttpd-egg-cache-trunk/Trac-0.12dev_r9313-py2.5.egg-tmp/trac/locale/nl/LC_MESSAGES'

The Python egg cache directory is currently set to:


Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

As this happens right after environment startup, this is likely the consequence of two concurrent requests by the same browser (the normal one + the opensearch one).

We need to use a lock here.

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 12 years ago

Summary: Need more robust fist time translation activationNeed more robust first time translation activation

A lock won't entirely prevent errors, as multiple processes might be involved. Maybe simply ignore the error.

in reply to:  1 comment:2 by Remy Blank, 12 years ago

Replying to cboos:

Maybe simply ignore the error.

I would even go as far as claiming that this is a setuptools issue. IMO it should implement some kind of locking to avoid having several processes writing to the egg cache at the same time.

comment:3 by Christian Boos, 12 years ago

We could simply ignore the error, in that case the translation will be delayed (use of LazyProxy).

comment:4 by Christian Boos, 12 years ago

Resolution: fixed
Status: newclosed

Should be fixed by r9426.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.