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

Converting large MDX file to StarDict #392

Closed
Digital-XxX opened this issue Oct 17, 2022 · 4 comments
Closed

Converting large MDX file to StarDict #392

Digital-XxX opened this issue Oct 17, 2022 · 4 comments
Labels

Comments

@Digital-XxX
Copy link

Digital-XxX commented Oct 17, 2022

I'm getting this error when converting .mdx to .ifo

[ERROR] Exception while calling plugin's write function
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pyglossary/glossary.py", line 827, in _write
gen.send(entry)
File "/usr/local/lib/python3.7/dist-packages/pyglossary/plugins/stardict.py", line 549, in write
yield from self.writeCompact(self._sametypesequence)
File "/usr/local/lib/python3.7/dist-packages/pyglossary/plugins/stardict.py", line 626, in writeCompact
uint32ToBytes(dictMark) +
File "/usr/local/lib/python3.7/dist-packages/pyglossary/text_utils.py", line 165, in uint32ToBytes
return struct.pack('>I', n)
struct.error: 'I' format requires 0 <= number <= 4294967295
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pyglossary/glossary.py", line 827, in _write
gen.send(entry)
File "/usr/local/lib/python3.7/dist-packages/pyglossary/plugins/stardict.py", line 549, in write
yield from self.writeCompact(self._sametypesequence)
File "/usr/local/lib/python3.7/dist-packages/pyglossary/plugins/stardict.py", line 626, in writeCompact
uint32ToBytes(dictMark) +
File "/usr/local/lib/python3.7/dist-packages/pyglossary/text_utils.py", line 165, in uint32ToBytes
return struct.pack('>I', n)
struct.error: 'I' format requires 0 <= number <= 4294967295
Traceback locals:
n = 4294971888

@Digital-XxX Digital-XxX changed the title Multiple write-options Error converting MDX to Stardict(.ifo) Oct 17, 2022
@ilius
Copy link
Owner

ilius commented Oct 18, 2022

How big is your mdx file?

@Digital-XxX
Copy link
Author

How big is your mdx file?

1.2 GB

@ilius ilius changed the title Error converting MDX to Stardict(.ifo) Converting large MDX file to StarDict Nov 25, 2022
@ilius
Copy link
Owner

ilius commented Jan 30, 2023

I created a branch stardict-large-file.
Please use this branch and add --write-options=large_file=true flag to your command and try again.

@ilius
Copy link
Owner

ilius commented Jan 30, 2023

Also what dictionary application do you want to use?

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