Skip to content

Commit

Permalink
0.2.1 - some bugs fixed
Browse files Browse the repository at this point in the history
### Fixed (#4)
- Encoding issue occuring during installations on some systems
- 'Invalid or unexistent files' error when importing json files
  • Loading branch information
Ezhvsalate authored Jul 6, 2020
1 parent fcb7bcb commit b7bb77d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.2.1] - 2020-07-06
### Fixed
- Encoding issue occuring during installations on some systems
- 'Invalid or unexistent files' error when importing json files

## [0.2.0] - 2020-07-01
### Changed
- Logic of PySimpleGui UI is split from processing data
Expand Down
4 changes: 2 additions & 2 deletions backend/handlers/NLUHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def import_data(self):
lambda node: node.name == example["intent"],
maxlevel=2,
)
IntentExample(name=example["text"], parent=current_intent)
self.add_to_items(example["text"])
IntentExample(name=example["example"], parent=current_intent)
self.add_to_items(example["example"])

except json.JSONDecodeError: # suggest it's markdown
with open(self.filename, "r", encoding="utf-8") as df:
Expand Down
4 changes: 2 additions & 2 deletions gui/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def launcher():

stories = StoriesHandler(values[STORIES_FILE_KEY], nlu, resp)
stories.import_data()
except (FileNotFoundError, KeyError):
except (FileNotFoundError, KeyError, AttributeError):
sg.Popup(
MSG_INVALID_OR_UNEXISTING_FILE,
icon=sg.SYSTEM_TRAY_MESSAGE_ICON_WARNING,
Expand All @@ -50,7 +50,7 @@ def launcher():
break
import_window.close()

if nlu: # and resp and stories:
if nlu and resp and stories:
nlu_tree = ExtendedTree(
data=nlu.export_to_pysg_tree(),
headings=[],
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from setuptools import setup, find_packages

with open("README.md", "r") as f:
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()

setup(
name="rasa-storyteller",
version="0.2",
version="0.2.1",
author="ezhvsalate",
author_email="[email protected]",
description="A simple GUI utility to create complex stories for RASA chatbots easily.",
Expand Down

0 comments on commit b7bb77d

Please sign in to comment.