Opened 14 years ago
Closed 14 years ago
#422 closed defect (invalid)
'function' object has no attribute 'ugettext'
Reported by: | hiemanshu@… | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.7 |
Component: | General | Version: | 0.6 |
Keywords: | Cc: |
Description
We a build script that we use to build fedora websites but with the latest version of fedora, fedora 15, this seems to be no longer working, its probably a newer version of python or something that has to do with it. I have tested with the official package within fedora, the svn code(revision 1162) and 0.6 tarball. It gives the following error :
Traceback (most recent call last):
File "build/build.py", line 116, in <module>
main()
File "build/build.py", line 113, in main
process(args)
File "build/build.py", line 35, in process
process_dir(dirpath, filenames)
File "build/build.py", line 66, in process_dir
).render(method='html', doctype='html')
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/core.py", line 184, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 57, in encode
return _encode(.join(list(iterator)))
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 470, in call
for kind, data, _ in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 826, in call
for kind, data, pos in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 670, in call
for kind, data, pos in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 771, in call
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/output.py", line 586, in call
for ev in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/core.py", line 273, in _ensure
event = stream.next()
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/template/base.py", line 606, in _include
for event in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/template/markup.py", line 326, in _match
for event in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/template/base.py", line 546, in _flatten
for kind, data, pos in stream:
File "/usr/lib/python2.7/site-packages/Genshi-0.7dev_r1162-py2.7.egg/genshi/filters/i18n.py", line 664, in call
gettext = self.translate.ugettext
AttributeError?: 'function' object has no attribute 'ugettext' make: * [af] Error 1
The make file and the build scripts that we use are all here : http://git.fedorahosted.org/git/?p=fedora-web.git;a=tree;f=fedoraproject.org;h=e85696762f9bf77ef580d8bf866dc3d74627e0fc;hb=HEAD
Change History (1)
comment:1 Changed 14 years ago by hodgestar
- Resolution set to invalid
- Status changed from new to closed
As discussed on IRC today, this was just an issue with the way the Genshi Translator was being instatiated. In Genshi 0.5 Translator took a function (e.g. gettext.GNUTranslation().gettext) as its first argument. In Genshi 0.6 Translator takes a translation object (e.g. gettext.GNUTranslation()).