Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
09c6d728
Commit
09c6d728
authored
Jul 17, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace error encode
parent
7b510d7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
olapy/core/mdx/executor/execute.py
olapy/core/mdx/executor/execute.py
+1
-2
olapy/core/services/xmla_discover_tools.py
olapy/core/services/xmla_discover_tools.py
+2
-2
olapy/core/services/xmla_execute_tools.py
olapy/core/services/xmla_execute_tools.py
+2
-2
No files found.
olapy/core/mdx/executor/execute.py
View file @
09c6d728
...
...
@@ -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'
...
...
olapy/core/services/xmla_discover_tools.py
View file @
09c6d728
...
...
@@ -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
]
...
...
olapy/core/services/xmla_execute_tools.py
View file @
09c6d728
...
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment