-
Notifications
You must be signed in to change notification settings - Fork 6
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
Failed to load pinyin dict #14
Comments
Hi. Thanks for asking! |
I am already able to import zhwiki by manually building from source, but I have not figured out how to build your repo yet. It seems that your sample config has relative import. How to run your CLI with your sample config? Is "tweak" necessary? |
Even by manually copy-paste tweak code to config.py produce errors. 2024-01-02 05:33:06,613 [DEBUG] Fetching titles from https://zh.moegirl.org.cn/api.php with a limit of 120
2024-01-02 05:33:06,613 [INFO] Partial session will be saved/read: partial.json
2024-01-02 05:33:06,613 [WARNING] Cannot read partial session: partial.json
Traceback (most recent call last):
File "/home/conrevo/miniconda3/bin/mw2fcitx", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/conrevo/miniconda3/lib/python3.11/site-packages/mw2fcitx/main.py", line 77, in main
build(config_object)
File "/home/conrevo/miniconda3/lib/python3.11/site-packages/mw2fcitx/build_dict.py", line 14, in build
pipeline.fetch_titles(**config["source"].get("kwargs"))
File "/home/conrevo/miniconda3/lib/python3.11/site-packages/mw2fcitx/pipeline.py", line 53, in fetch_titles
titles = fetch_all_titles(self.api_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conrevo/miniconda3/lib/python3.11/site-packages/mw2fcitx/fetch.py", line 85, in fetch_all_titles
for i in map(lambda x: x["title"], data["query"]["allpages"]):
~~~~^^^^^^^^^
KeyError: 'query' Edit: I manually create one partial.json and get {'error': {'code': 'action-notallowed', 'info': '⧼apierror-action-notallowed⧽', '*': 'See https://zh.moegirl.org.cn/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.'}} |
I finally reach #13 (comment) so I cannot build on my own anyway the current version in github release might not be compatible with fcitx5 5.0.14 |
As you may have observed from #13, it's currently not working for zh.moegirl.org.cn due to the restriction of that wiki. It should still work on most of the other wikis which allow access to the page list API. |
fcitx-pinyin-zhwiki is using the dump files provided by Wikipedia, and is thus not affected by issues like #13.
That might be a problem. I'll have a check. |
After looking at felixonmars#34, I noticed that |
Closing due to inactivity. Please feel free to re-open for further issues on this problem. |
I am fairly new to fcitx5, so bear with me if this is a silly question. System info: Ubuntu 22.04 + KDE Plasma 5.27
I installed fcitx5 via sudo apt install fcitx5 fcitx5-config-qt fcitx5-chinese-addons and get fcitx5 5.0.14
Then I download your dict and I have /home//.local/share/fcitx5/pinyin/dictionaries/zhwiki-20231205.dict
Then I init fcitx via console (type fcitx5 in command line). From the log, I get
From my user experience, I cannot observe any import from your dictionary. Any help?
The text was updated successfully, but these errors were encountered: