-
Notifications
You must be signed in to change notification settings - Fork 89
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
Getting errors about etype
possibly dtype
typo?
#122
Comments
This seems to be from an old version. The current versions on pypi are quite dated (I'll try to release new ones next week once I get my current changes stabilized). For now I would recommend installing both wikitextprocessor and wiktextract from the repository in github. (However be aware that even the repo is currently a bit unstable as I'm in the middle of debugging a hang in my production environment that I haven't yet been able to reproduce on my development machine, plus some other changes; I expect this to resolve by mid next week.) |
No rush! The error might have been on me. The wiktextract readme may have mentioned this, but I had not pip installed wikitextprocessor. pip installing that independently resolved the issue for me (I used the |
Still getting this error here with the latest from github:
|
Oops, seems like the above comment was missed when the issue was still closed. Reopening for now. |
@doctorcolossus if you have wikitextprocessor installed from pypi, or a version of wikitextprocessor from github from before December 6th 2021, then Wtp.node_to_html in wikitextprocessor/core.py doesn't have the node_handler_fn key parameter, which seems to be the problem here. Up-to-date versions of both wiktextract and wikitextprocessor are required, and both of them are really old on pypi. |
Ah, thank you! I had been under the impression that it was wiktextract which needed the latest version, and wikitextprocessor was a dependency I wasn't even aware of which was most likely brought in by pip from when I first tried installing wiktextract from there. Let me grab the latest version of that and give it a try. I'll report back in a moment. |
Hmm, not so easy unfortunately...
Obviously |
|
Okay, I persisted a little and that turned out to be a known problem with |
Still getting this with wikitextprocessor installed from the github repository (8207892321161aca45bfe210615dba19c96fb001):
|
This seems like a problem with Lua-scripting timeouts when expanding templates. Afaict, it should fail "gracefully" by outputting error messages into the output of the expansion itself, so this seems like a bug at some level. However, it's a different issue from the original post of this thread (and the stuff with github vs. pypi installations), so please start a new issue and then I will close this one. |
Puttering around with my own stuff, turns out the etype= error was actually a bug in wikitextprocessor... But it's a bug that only affects the traceback formatter from the traceback package, so all it did was not give the correct error messages in the tracebacks. So, fixing it would not have fixed any of the underlying errors and you'd have had a crash anyhow, just with better information. The traceback formatter is used with Lua stuff, which itself is used when expanding templates from the wiktionary source. The bug was simply that etype= as a keyvalue in a function call has been deprecated and removed in newer versions of Python 3. The argument is now positional. As soon we get this fixed on wikitextprocessor, Lua errors should start looking much more informative. @doctorcolossus please repost your latest post as a new issue then. |
Hey Kristian, sorry that my replies have slowed down recently - I've been very busy with work and life. Today I pulled the latest changes from wiktextract and ran the same command given above, and it succeeded for the first time. It takes a while to run and quite a bit of memory in the meantime, which I can't afford again just this moment, but I will try to remember to try one more time in the next day or two, perhaps with a different language, and will open a new issue if I do experience this issue again. But perhaps it is fixed now? Thank you so much for your attention and feedback. |
Out of curiosity, did you also update wikitextprocessor? None of the commits I've made to wiktextract should have done anything regarding the issue in this thread, and the change in wikitextprocessor was minor. In that case it might succeed or fail arbitrarily. I'll have to ask Tatu when he's not busy, but it's possible that fixing the Lua error messaging allowed some other bit of code to catch the exceptions and fail gracefully. In fact, now that I wrote that, it seems even probable. |
When I tried a |
Then it seems the issue was not the fix in wikitextprocessor. If you pull it now, you should get better error messages if the problem crops up again the future. For now, I'm closing this specific thread. |
With a fresh install and processing a wiktionary dump, I get the following error. It honestly just looks like a typo, but I can't find it:
The text was updated successfully, but these errors were encountered: