Commit 09c6d728 authored by mouadh's avatar mouadh

replace error encode

parent 7b510d7b
......@@ -309,7 +309,7 @@ class MdxEngine:
for tup_att in tup[0].replace('.Members', '').split('.') if tup_att
]
for tup in re.compile(regex).findall(
query.encode("utf-8")[start:stop])
query.encode("utf-8",'replace')[start:stop])
if len(tup[0].split('.')) > 1]
# TODO temporary function
......@@ -326,7 +326,6 @@ class MdxEngine:
on_where = []
try:
# ON ROWS
if 'ON ROWS' in query:
stop = 'ON ROWS'
......
......@@ -1929,7 +1929,7 @@ class XmlaDiscoverTools():
# french caracteres
# TODO encode dataframe
if type(df.iloc[0][0]) == unicode:
column_attribut = df.iloc[0][0].encode('utf-8')
column_attribut = df.iloc[0][0].encode('utf-8','replace')
else:
column_attribut = df.iloc[0][0]
......@@ -2006,7 +2006,7 @@ class XmlaDiscoverTools():
# french caracteres
# TODO encode dataframe
if type(df.iloc[0][0]) == unicode:
column_attribut = df.iloc[0][0].encode('utf-8')
column_attribut = df.iloc[0][0].encode('utf-8','replace')
else:
column_attribut = df.iloc[0][0]
......
......@@ -155,7 +155,7 @@ class XmlaExecuteTools():
# french caracteres
# TODO encode dataframe
if type(tuple_without_minus_1[-1]) == unicode:
tuple_without_minus_1 = [x.encode('utf-8') for x in tuple_without_minus_1]
tuple_without_minus_1 = [x.encode('utf-8','replace') for x in tuple_without_minus_1]
axis0 += """
<Member Hierarchy="[{0}].[{0}]">
......@@ -562,7 +562,7 @@ class XmlaExecuteTools():
# TODO encode dataframe
# french caracteres
if type(self.executer.tables_loaded[dim_diff].iloc[0][0]) == unicode:
column_attribut = self.executer.tables_loaded[dim_diff].iloc[0][0].encode('utf-8')
column_attribut = self.executer.tables_loaded[dim_diff].iloc[0][0].encode('utf-8','replace')
else:
column_attribut = self.executer.tables_loaded[dim_diff].iloc[0][0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment