Traceback (most recent call last):
File "/home/gonguinguen/medios/gluon/main.py", line 435, in wsgibase
session.connect(request, response)
File "/home/gonguinguen/medios/gluon/globals.py", line 996, in connect
response.cookies[response.session_id_name] = response.session_id
File "/usr/lib64/python2.7/Cookie.py", line 592, in __setitem__
self.__set(key, rval, cval)
File "/usr/lib64/python2.7/Cookie.py", line 585, in __set
M.set(key, real_value, coded_value)
File "/usr/lib64/python2.7/Cookie.py", line 459, in set
if "" != translate(key, idmap, LegalChars):
File "/usr/lib64/python2.7/string.py", line 493, in translate
return s.translate(table, deletions)
TypeError: translate() takes exactly one argument (2 given)
/dps
with open('map.pkl', 'wb') as file:
pickle.dump(dictionary_map, file, protocol=2)map = pickle.load(open('domains_apps.pkl', 'rb'))
routers = dict(
BASE=dict(
default_controller='default',
default_function='index',
domains=map,
map_static=True,
exclusive_domain=True,
)
)
>>> map = pickle.load(open(path, 'rb'))
>>> first_key = list(map.keys())[0]
>>> print(type(first_key))
<type 'unicode'>
>>> print(type(map[first_key]))
<type 'unicode'>>>> map = pickle.load(open(path, 'rb'))
>>> first_key = list(map.keys())[0]
>>> print(type(first_key))
<class 'str'>
>>> print(type(map[first_key]))
<class 'str'>map = pickle.load(open('domains_apps.pkl', 'rb'))
# ---------- TEMP FIX ---------------
new_map = {}
for key in list(map):
new_map[str(key)] = str(map[key])
map = new_map
# -----------------------------------
routers = dict(
BASE=dict(
default_controller='default',
default_function='index',
domains=map,
map_static=True,
exclusive_domain=True,
)
)