Skip to content

Instantly share code, notes, and snippets.

@piotr-dobrogost
Last active November 4, 2015 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotr-dobrogost/4797ffb75243af788a9b to your computer and use it in GitHub Desktop.
Save piotr-dobrogost/4797ffb75243af788a9b to your computer and use it in GitHub Desktop.
Interaction between overrides and translations in Pyramid
from pyramid.config import Configurator
if __name__ == '__main__':
config = Configurator()
config.override_asset('app', 'app.subapp:app-overrides/')
config.commit()
config.add_translation_dirs('app:locale')
Traceback (most recent call last):
File "/home/piotr/apps/pycharm-4.5.3/helpers/pydev/pydev_run_in_console.py", line 69, in <module>
globals = run_file(file, None, None)
File "/home/piotr/apps/pycharm-4.5.3/helpers/pydev/pydev_run_in_console.py", line 29, in run_file
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/piotr/projects/pyramid/app/main.py", line 8, in <module>
config.add_translation_dirs('app:locale')
File "/home/piotr/projects/pyramid/pyramid/util.py", line 570, in wrapper
result = wrapped(self, *arg, **kw)
File "/home/piotr/projects/pyramid/pyramid/config/i18n.py", line 87, in add_translation_dirs
directory)
pyramid.exceptions.ConfigurationError: "/home/piotr/projects/pyramid/app/locale" is not a directory
app
├── __init__.py
├── main.py
└── subapp
├── app-overrides
├── __init__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment