-
Notifications
You must be signed in to change notification settings - Fork 62
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
"force natlink to reload all grammars" occasionally causes errors #77
Comments
I've run into this too, and am not sure how to fix it. The only work-around I know about is restarting Dragon. |
Likewise. Have you been able to reproduce this error reliably? I haven't and this makes it hard to fix... On October 27, 2014 11:00:20 PM EDT, Alex Roper [email protected] wrote:
|
Afraid not, but I don't reload frequently in regular use, only when developing, wihch I haven't done much of since you changed how reloads work. Before that change it was easy to reproduce, just import a module that's not a grammar. |
Are you saying this was already an issue before the reload change I made? I never noticed it before that. On October 27, 2014 11:17:23 PM EDT, Alex Roper [email protected] wrote:
|
Yeah your change went from never working to sometimes working:-) |
Interesting! At least we are making progress! I figure the ordering of sys.modules might differ from run to run so I've changed the code on my local copy to always sort it before doing anything. We'll see if that makes things more predictable... |
Is anyone still encountering this issue? I have not had it happen for some time now so perhaps it was fixed by some other change. |
I am encountering this issue. I need to restart DNS each time i update the files :( |
I'm sure a pull request would be welcome :-)
…On Fri, Mar 23, 2018, 11:15 PM Jon Yorg ***@***.***> wrote:
I am encountering this issue. I need to restart dragon each time i update
the files :(
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAoHSP0_cJDTm1qbQ6lP3iEHdhyRlp7Zks5theR9gaJpZM4Czp1U>
.
|
I encountered the error as well and made a makeshift fix. I don't think the solution is worth a pull request but I can elaborate on the problem to make it easy to fix later on. I first encountered the problem when I started to use _multiedit.py. The unload function was causing the problem. Long story short, this grammar deals with the vocabulary grammar to inhibit/uninhibit some vocabularies. It calls on to uninhibit them while unloading. Not sure how that works but the vocabulary grammar is multiedit's wrapper. I don't even know what wrapper means in this case. The problem occurs because the vocabulary grammar is the first to unload. Thus, when multiedit attemps to unload, because the "wrapper" is not loaded, it raises an error. The traceback is at the bottom. My dumbass solution was to just go to the unloadEverything function in core/natlinkmain.py and hardcode into it that it should unload the grammar named "_vocabulary" the last.
|
Specifically, sometimes modules used in grammars are set to None after running this command but this does not always happen. This causes obvious problems when grammars attempt to refer to those modules...
Presumeably, this command sometimes unloads modules it shouldn't (modules imported from grammars are unloaded and then reloaded in the implementation). It's also possible that it might reload things in the wrong order which could also cause problems (this seems like the most likely cause).
The text was updated successfully, but these errors were encountered: