Skip to content

Commit

Permalink
Merge pull request #14 from shariqmalik/patch-1
Browse files Browse the repository at this point in the history
Fixed Error of unicode encoding
  • Loading branch information
blackary authored Jan 3, 2023
2 parents bc65d1e + d404c34 commit f1c3399
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: testing

on:
push:
pull_request:

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "st-pages"
version = "0.3.0"
version = "0.3.1"
description = "An experimental version of Streamlit Multi-Page Apps"
authors = ["Zachary Blackwood <zachary@streamlit.io>"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions src/st_pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ def _get_pages_from_config(path: str = ".streamlit/pages.toml") -> list[Page] |
Given a path to a TOML file, read the file and return a list of Page objects
"""
try:
raw_pages: list[dict[str, str | bool]] = toml.loads(Path(path).read_text())[
"pages"
]
raw_pages: list[dict[str, str | bool]] = toml.loads(
Path(path).read_text(encoding="utf-8")
)["pages"]
except (FileNotFoundError, toml.decoder.TomlDecodeError, KeyError):
st.error(
f"""
Expand Down

0 comments on commit f1c3399

Please sign in to comment.