veeara282 / instant-press

Open source CMS for the Web2Py framework
GNU General Public License v2.0
4 stars 4 forks source link

Instant Press Bad Bug #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is My Problems

1.When I clicked on the option to insert new matter, gave this error

2. Error ticket for "InstantPress"

Ticket 127.0.0.1.2010-10-20.07-31-23.17798482-5fcd-44ee-a247-42c1d90da286

Error traceback
1.
2.
3.
4.
5.
6.
7.
8.
Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 188, in restricted
    exec ccode in environment
  File "/home/www-data/web2py/applications/InstantPress/views/default/index.html", line 470, in <module>
  File "applications/InstantPress/modules/widgets.py", line 71, in get_menu
    xml_menu='<ul><li>%s</li> %s </ul>' % (link_home,xml_pages)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: 
ordinal not in range(128)
Error snapshot
Detailed traceback description
Exception: <type 'exceptions.UnicodeDecodeError'>('ascii' codec can't decode 
byte 0xc3 in position 48: ordinal not in range(128))
Python 2.6.5: /usr/bin/python
File /home/www-data/web2py/gluon/restricted.py in restricted at line 188
[ code | arguments | variables ]
File /home/www-data/web2py/applications/InstantPress/views/default/index.html 
in <module> at line 470
[ code | arguments | variables ]
File /home/www-data/web2py/applications/InstantPress/modules/widgets.py in 
get_menu at line 71
[ code | arguments | variables ]
Function argument list: 
(self=<applications.InstantPress.modules.widgets.Widgets object>)
66.
67.
68.
69.
70.
71.

72.
73.
74.
75.
            xml_pages += sanitate_string(xml_page)

        link_home = A(T('Home'), _href=URL(request.application,\
                                           self.i2p.config.controller_default,\
                                           'index'))
        xml_menu='<ul><li>%s</li> %s </ul>' % (link_home,xml_pages)

        return xml_menu

link_home: <gluon.html.A object>
xml_pages: u'<li><a href="/InstantPress/default/page/ubuntu-904">Ubuntu 
9.04</a></li>'
xml_menu: undefined

3.and now I can not more start the app

ovidio marinho
ovidioccg@gmail.com

Original issue reported on code.google.com by Ovidio...@gmail.com on 20 Oct 2010 at 10:35

GoogleCodeExporter commented 9 years ago
I'm trying to reproduce your problem, but I have not luck.  Can you help me to 
debug this problem, change this line:

xml_pages += sanitate_string(xml_page)

with this:

xml_pages += xml_page

For some reason there are a mixing of unicode type and string.

Original comment by mulone.m...@gmail.com on 20 Oct 2010 at 2:18

GoogleCodeExporter commented 9 years ago

Original comment by mulone.m...@gmail.com on 21 Oct 2010 at 8:19