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

Couldn't find end of Start Tag q_code #1

Closed
sorashi opened this issue Jun 7, 2019 · 4 comments
Closed

Couldn't find end of Start Tag q_code #1

sorashi opened this issue Jun 7, 2019 · 4 comments
Labels

Comments

@sorashi
Copy link

sorashi commented Jun 7, 2019

I'm trying to run GeekJDict on Windows using Strawberry Perl, but while running the setup command:

geekjdict --update=kanji --lang=eng kanjidic2.xml.gz Unihan.zip cangjie5.txt

I ran into this problem (XML parser failing?):

Entity: line 4331: parser error : attributes construct error
<q_code qc_type="sh_des4g m_lang="fr">trame (tissage)</meaning>
                                  ^
Entity: line 4331: parser error : Couldn't find end of Start Tag q_code
<q_code qc_type="sh_des4g m_lang="fr">trame (tissage)</meaning>
                                  ^
Can't use an undefined value as a subroutine reference at C:/Users/user/AppData/Local/geekjdict/lib/GeekJDict/Update.pm line 84.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=file:C:\Users\user\.geekjdict.sqlite?mode=rwc at C:/Users/user/AppData/Local/geekjdict/lib/GeekJDict/Update.pm line 84.

This error output seems to be referring to kanjidic2.xml at line 4331

<dic_ref dr_type="sh_kk2">1342</dic_ref>

But the trame (tissage) text can be found at line 4288:

<meaning m_lang="fr">trame (tissage)</meaning>

And the q_code tag is normally closed

<q_code qc_type="sh_desc">6a10.7</q_code>

Where is the problem? Is there anything I can do to make it work?

@sorashi
Copy link
Author

sorashi commented Jun 7, 2019

I can see GeekJDict depends on a lot of Linux internals, it might be very hard to run it on Windows...

One thing I had found out before even attempting to run GeekJDict using Strawberry Perl -- GeekJDict can't be run using WSL (Windows Subsystem for Linux) because of this issue microsoft/WSL#2395

@sorashi
Copy link
Author

sorashi commented Jun 7, 2019

By the way -- I tried GeekJDict on my Ubuntu VPS and it's awesome. You did a very VERY good job. That's a lot of functionality. I think I will make a VM just to use GeekJDict.

If the reason for my problem doesn't come to your mind, just close this issue :)

@kroki kroki added the wontfix label Jun 8, 2019
@kroki
Copy link
Owner

kroki commented Jun 8, 2019

I couldn't reproduce the problem with latest kanjidic2.xml.gz on Linux. Could it be the problem with XML::LibXML::Reader (my version is 2.0134) bundled with Strawberry Perl? At least for ActiveState Perl (another Perl for Windows that you may want to give a try) they tweak original Perl modules to make them work on Windows. BTW, you also have to use terminal that supports UTF-8, wide characters and 256 colors.

In any case, Windows is not officially supported, so closing with WONTFIX.

@kroki kroki closed this as completed Jun 8, 2019
@kroki
Copy link
Owner

kroki commented Jun 8, 2019

RE you "Windows installation" instructions: I don't know what WSL is, but GeekJDict writes to DB only when performing --update, never during normal operation (except at the start where it may have to rollback incomplete transaction if previous --update failed and DB is left in a dirty state). So if you are careful to never run --update and normal dictionary mode in parallel (and it is advised to always restart GJD after --update anyway), to my understanding you can't hit microsoft/WSL#2395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants