Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission errors during export are not handled in interactive training #5921

Closed
Dobatymo opened this issue Jun 1, 2020 · 8 comments
Closed
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@Dobatymo
Copy link
Contributor

Dobatymo commented Jun 1, 2020

Rasa version:1.10.0
Python version: 3.7.4
Operating system: Windows

Issue:
If writing the exported data from interactive training (stories, nlu, domain using "Export and quit") raises a PermissionError, the training data is lost. I will attach a pull request which catches the error and asks for user interaction.

PR: #5922

@Dobatymo Dobatymo added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Jun 1, 2020
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @chkoss will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@wochinge wochinge self-assigned this Jun 10, 2020
@wochinge
Copy link
Contributor

@Dobatymo Why is the permission error happening in the first place?

@wochinge wochinge added the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Jun 10, 2020
@Dobatymo
Copy link
Contributor Author

It mostly happens when multiple people are working on the same chatbot repository.
For example, Person A pulls changes from a github repo on a shared server and person B starts the interactive training. Then when exporting the stories the PermissionError is raised and all stories lost.

Then to fix, we would run chmod on the story/domain/nlu files and redo the training.

With my pull request, we can run chmod when we encounter the error and try exporting again, so we don't lose any training data.

@no-response no-response bot removed the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Jun 11, 2020
@wochinge
Copy link
Contributor

Phew. I think this is an error which is very specific to your use case and should be handled within your infrastructure and not within Rasa Open Source.

E.g. you could make the files readable by the group and have all users be part of the same group.

@wochinge wochinge added the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Jun 11, 2020
@Dobatymo
Copy link
Contributor Author

I already fixed the problem with a different set of permissions. But I still think handling PermissionErrors (and probably other kinds of OSErrors) is a useful and expected feature. When my text editor cannot save a file, I expect it to ask me to retry instead of crash.

@no-response no-response bot removed the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Jun 12, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2020
@Dobatymo
Copy link
Contributor Author

Dobatymo commented Sep 11, 2020

I changed to pull request to handle all OSErrors to catch other IO errors like full disk for example. I think these kind of errors should be handled, as they would be with other text editors.

@stale stale bot removed the stale label Sep 11, 2020
@wochinge
Copy link
Contributor

Sorry @Dobatymo, the notifications for your previous message somehow slipped through the cracks. Will give your PR a review 👍

@wochinge wochinge closed this as completed Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants