Line 50 with the error is not in my code and thus I would assume inserted
by the framework.
I am running the latest version.
How do I resolve this?
Error ticket for "button" Ticket ID
127.0.0.1.2014-10-13.08-20-54.0005b39b-3509-4030-8641-07be3a8e83ad
<type 'exceptions.ValueError'> unsupported format character ':' (0x3a) at
index 5 Version web2py™ Version 2.10.0-beta+timestamp.2014.09.24.13.35.58
Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
Traceback (most recent call last):
File "/home/mc/development/web2py_api/gluon/restricted.py", line 224, in
restricted
exec ccode in environment
File
"/home/mc/development/web2py_api/applications/button/controllers/data.py"
<https://127.0.0.1:8000/admin/default/edit/button/controllers/data.py>, line
50, in <module>
File "/home/mc/development/web2py_api/gluon/globals.py", line 393, in <lambda>
self._caller = lambda f: f()
File
"/home/mc/development/web2py_api/applications/button/controllers/data.py"
<https://127.0.0.1:8000/admin/default/edit/button/controllers/data.py>, line
37, in taxonomies
grid = SQLFORM.smartgrid(db.taxonomy, linked_tables=['product',
'campaign'], user_signature=False)
File "/home/mc/development/web2py_api/gluon/sqlhtml.py", line 2926, in
smartgrid
grid.view_form.record))
File "/home/mc/development/web2py_api/gluon/sqlhtml.py", line 2796, in format
return table._format % row
ValueError: unsupported format character ':' (0x3a) at index 5
In file:
/home/mc/development/web2py_api/applications/button/controllers/data.py
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
__author__ = 'mc'
import socket
response <https://127.0.0.1:8000/examples/global/vars/response>.menu =
[['Taxonomy', False, URL
<https://127.0.0.1:8000/examples/global/vars/URL>('taxonomies')],
['Manufacturer', False, URL
<https://127.0.0.1:8000/examples/global/vars/URL>('manufacturers')],
#['Campaign', False, URL('campaign')]
]
def index():
html = P <https://127.0.0.1:8000/examples/global/vars/P>('Welcome to the
data administration section.') + P
<https://127.0.0.1:8000/examples/global/vars/P>('Select an option from the Edit
menu.')
"""
request.env.http_client_ip
request.env.http_x_forwarded_for
request.env.remote_addr
"""
if response <https://127.0.0.1:8000/examples/global/vars/response>:
html += DIV <https://127.0.0.1:8000/examples/global/vars/DIV>(
HTML <https://127.0.0.1:8000/examples/global/vars/HTML>('HOST: ') +
str(request
<https://127.0.0.1:8000/examples/global/vars/request>.env.http_host) + BR
<https://127.0.0.1:8000/examples/global/vars/BR>() +
HTML <https://127.0.0.1:8000/examples/global/vars/HTML>('HOSTName:
') + str(socket.gethostbyname(socket.gethostname())) + BR
<https://127.0.0.1:8000/examples/global/vars/BR>() +
HTML <https://127.0.0.1:8000/examples/global/vars/HTML>('HTTP
Client IP: ') + str(request
<https://127.0.0.1:8000/examples/global/vars/request>.env["http_client_ip"]) +
BR <https://127.0.0.1:8000/examples/global/vars/BR>() +
HTML <https://127.0.0.1:8000/examples/global/vars/HTML>('HTTP X
Forward: ') + str(request
<https://127.0.0.1:8000/examples/global/vars/request>.env["http_x_forwarded_for"])
+ BR <https://127.0.0.1:8000/examples/global/vars/BR>() +
HTML <https://127.0.0.1:8000/examples/global/vars/HTML>('REMOTE: ')
+ str(request
<https://127.0.0.1:8000/examples/global/vars/request>.env["remote_addr"])
, _class='alert alert-info', _role='alert')
else:
html += DIV <https://127.0.0.1:8000/examples/global/vars/DIV>('IP: No
response object', _class='alert alert-info', _role='alert')
html += DIV <https://127.0.0.1:8000/examples/global/vars/DIV>(BEAUTIFY
<https://127.0.0.1:8000/examples/global/vars/BEAUTIFY>(request
<https://127.0.0.1:8000/examples/global/vars/request>.user_agent()),
_class='alert alert-info', _role='alert')
return dict(message=html)
def taxonomies():
grid = SQLFORM
<https://127.0.0.1:8000/examples/global/vars/SQLFORM>.smartgrid(db.taxonomy,
linked_tables=['product', 'campaign'], user_signature=False)
return dict(grid=grid)
def manufacturers():
grid = SQLFORM
<https://127.0.0.1:8000/examples/global/vars/SQLFORM>.smartgrid(db.manufacturer,
linked_tables=['manufacturer_brand', 'product', 'campaign'],
user_signature=False)
return dict(grid=grid)
#def campaign():
# grid = SQLFORM.smartgrid(db.product, linked_tables=['campaign',
'product_view', 'product_sale'], user_signature=False)
# return dict(grid=grid)
response <https://127.0.0.1:8000/examples/global/vars/response>._vars=response
<https://127.0.0.1:8000/examples/global/vars/response>._caller(taxonomies)
--
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.