Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eva Schiffer
UW-Glance
Commits
5ee3a299
Commit
5ee3a299
authored
Mar 01, 2022
by
Eva Schiffer
Browse files
specify encoding when creating reports in the gui to fix stats display
parent
e69db0db
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyglance/glance/gui_statsprovider.py
View file @
5ee3a299
...
...
@@ -107,9 +107,9 @@ class GlanceGUIStats (object) :
kwargs
=
{
constants
.
RUN_INFO_DICT_KEY
:
tempInfo
,
constants
.
STATS_INFO_DICT_KEY
:
tempStatsDict
,
constants
.
GROUPED_STATS_INFO_DICT_KEY
:
stats
.
group_stats_by_file
(
tempStatsDict
),
}
# use a mako template to render an html verion of the stats for display
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)])
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)]
,
input_encoding
=
'utf-8'
,
output_encoding
=
'utf-8'
)
guiTemplate
=
Template
(
resource_string
(
__name__
,
GUI_STATS_REPORT_TEMPLATE
),
lookup
=
templateLookup
)
renderedText
=
guiTemplate
.
render
(
**
kwargs
)
...
...
@@ -135,7 +135,7 @@ class GlanceGUIStats (object) :
}
# use a mako template to render an html verion of the stats for display
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)])
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)]
,
input_encoding
=
'utf-8'
,
output_encoding
=
'utf-8'
)
guiTemplate
=
Template
(
resource_string
(
__name__
,
GUI_STATS_REPORT_TEMPLATE
),
lookup
=
templateLookup
)
renderedText
=
guiTemplate
.
render
(
**
kwargs
)
...
...
@@ -165,7 +165,7 @@ class GlanceGUIStats (object) :
if
packedData
is
not
None
:
# use a mako template to render an html verion of the global attributes for display
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)])
templateLookup
=
TemplateLookup
(
directories
=
[
resource_filename
(
__name__
,
"."
)]
,
input_encoding
=
'utf-8'
,
output_encoding
=
'utf-8'
)
guiTemplate
=
Template
(
resource_string
(
__name__
,
GUI_G_ATTRS_REPORT_TEMPLATE
),
lookup
=
templateLookup
)
renderedText
=
guiTemplate
.
render
(
**
packedData
)
...
...
Write
Preview
Supports
Markdown
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