This looks like http://trac.turbogears.org/turbogears/ticket/1078 ,  
which I fixed on the 18th of last month. I don't know if that was  
before or after 0.9a8 .

 >>> Eric


On Sep 4, 2006, at 12:13 PM, Olli Wang wrote:

>
> Hi, folks. My i18n couldn't collect strings. got traceback:
> Page handler: <function _wrapper at 0x018D0A30>
> Traceback (most recent call last):
>   File
> "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy 
> \_cphttptools.py",
> line 105, in _run
>     self.main()
>   File
> "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy 
> \_cphttptools.py",
> line 254, in main
>     body = page_handler(*virtual_path, **self.params)
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \identity\conditions.py",
> line 275, in _wrapper
>     return fn( *args, **kw )
>   File "<string>", line 3, in string_collection
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \controllers.py",
> line 331, in expose
>     output = database.run_with_transaction(
>   File "<string>", line 5, in run_with_transaction
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \database.py",
> line 245, in so_rwt
>     retval = func(*args, **kw)
>   File "<string>", line 5, in _expose
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \controllers.py",
> line 348, in <lambda>
>     mapping, fragment, *args, **kw)))
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \controllers.py",
> line 372, in _execute_func
>     output = errorhandling.try_call(func, *args, **kw)
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \errorhandling.py",
> line 71, in try_call
>     return func(self, *args, **kw)
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\__init__.py",
> line 292, in string_collection
>     self.collect_string_for_files(files)
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\__init__.py",
> line 252, in collect_string_for_files
>     pygettext.main()
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\pygettext.py",
> line 724, in main
>     tokenize.tokenize(fp.readline, eater)
>   File "C:\Python24\lib\tokenize.py", line 153, in tokenize
>     tokenize_loop(readline, tokeneater)
>   File "C:\Python24\lib\tokenize.py", line 160, in tokenize_loop
>     tokeneater(*token_info)
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\pygettext.py",
> line 394, in __call__
>     self.__state(ttype, tstring, stup[0])
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\pygettext.py",
> line 445, in __openseen
>     self.__addentry(EMPTYSTRING.join(self.__data))
>   File
> "c:\python24\lib\site-packages\TurboGears-0.9a8-py2.4.egg\turbogears 
> \toolbox\admi18n\pygettext.py",
> line 469, in __addentry
>     msg = eval(repr(msg)[1:])
>   File "<string>", line 1
>     Please set your password and infomation.'
>              ^
> SyntaxError: invalid syntax
>
> ##############################################
> The syntax error it points is the first string of my collected codes,
> it's just a simple line:
> turbogears.flash(_('Please set your password and infomation.'))
>
> if I delete this line and re-collect, i18n will still get similar
> traceback with another _("") string. any help? thanks
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to