The error message seems to indicate that you're using web2py with Python 3. This seems to be a remaining issue pending the full compatibility of web2py with Py3: unicode is a builtin function of Python 2.
El miércoles, 1 de noviembre de 2017, 20:59:32 (UTC-3), Арслан Ибатуллин escribió: > > Hi, i'm newbee on web-development, so if i click on every db(even in new > created app), web2py gives me traceback: > > Traceback (most recent call last): > File "/app/gluon/restricted.py", line 219, in restricted > exec(ccode, environment) > File "/app/applications/blank/views/appadmin.html" > <https://strbsu-blanks.herokuapp.com/admin/edit/blank/views/appadmin.html>, > line 155, in <module> > {{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} > **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", > File "/app/gluon/globals.py", line 427, in write > self.body.write(to_native(xmlescape(data))) > File "/app/gluon/html.py", line 125, in xmlescape > return to_bytes(data.xml()) > File "/app/gluon/languages.py", line 426, in xml > return str(self) if self.M else local_html_escape(str(self), quote=False) > File "/app/gluon/languages.py", line 386, in __str__ > self.T.translate(self.m, self.s)) > File "/app/gluon/languages.py", line 945, in translate > message = self.params_substitution(message, symbols) > File "/app/gluon/languages.py", line 923, in params_substitution > message = regex_plural.sub(sub_plural, message) > File "/app/gluon/languages.py", line 916, in sub_plural > part = regex_plural_tuple.sub(sub_tuple, s) > File "/app/gluon/languages.py", line 881, in sub_tuple > return fun(self.plural(word, symbols[int(i)])) > File "/app/gluon/languages.py", line 118, in cap_fun > return unicode(s, 'utf-8').capitalize().encode('utf-8') > NameError: name 'unicode' is not defined > > Before i've deleted some languages from folder. And in the users view i've > replaced some label with russian translate(ya i know about T(text), > but...). Also, i'm using heroku, so i've replaced standart db with Postgres. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

