Skip to content

BGL: OSError: CRC check failed #55

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

Closed
VahidN opened this issue May 24, 2016 · 2 comments
Closed

BGL: OSError: CRC check failed #55

VahidN opened this issue May 24, 2016 · 2 comments
Assignees
Labels

Comments

@VahidN
Copy link

VahidN commented May 24, 2016

I'm testing the latest master branch to convert Accounting_English_Persian.BGL file to .csv, using Python35-32 on Windows.
The program gives me this error:

Traceback (most recent call last):
  File "pyglossary\glossary.py", line 522, in read
    Reader = self.readerClasses[format]
KeyError: 'BabylonBgl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ui\ui_tk.py", line 86, in CallWrapper__call__
    return self.func(*args)
  File "ui\ui_tk.py", line 728, in load
    ex = self.glos.read(iPath, format=format)
  File "pyglossary\glossary.py", line 529, in read
    **options
  File "pyglossary\plugins\babylon_bgl.py", line 2820, in read
    if not reader.read():
  File "pyglossary\plugins\babylon_bgl.py", line 1269, in read
    if not self.readBlock(block):
  File "pyglossary\plugins\babylon_bgl.py", line 1210, in readBlock
    length = self.readBytes(1)
  File "pyglossary\plugins\babylon_bgl.py", line 1252, in readBytes
    buf = self.file.read(bytes)
  File "C:\Python35-32\lib\gzip.py", line 274, in read
    return self._buffer.read(size)
  File "C:\Python35-32\lib\_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "C:\Python35-32\lib\gzip.py", line 452, in read
    self._read_eof()
  File "C:\Python35-32\lib\gzip.py", line 499, in _read_eof
    hex(self._crc)))
OSError: CRC check failed 0x0 != 0x550f2e74

The main site shows its entries here. So I don't think it has a CRC error.

@ilius ilius added the Bug label May 26, 2016
@ilius ilius self-assigned this May 26, 2016
@ilius
Copy link
Owner

ilius commented May 26, 2016

I suggest you use python2.7 branch until I fix the BGL plugin once for all
https://github.com/ilius/pyglossary/tree/python2.7

@ilius ilius changed the title OSError: CRC check failed BGL: OSError: CRC check failed May 26, 2016
@ilius ilius closed this as completed in a1ddfdf Jun 9, 2016
ilius added a commit that referenced this issue Jun 9, 2016
Split into a package with 8 files
Fix bytes/str bugs (fix #54)
Fix CRC check bug (fix #55) by shipping and modifying gzip module:
    https://hg.python.org/cpython/file/3.5/Lib/gzip.py
Migrate to Reader class
Rename bytes and str variables to b_* and u_*
Fix logic and a lot of cleanings
@ilius
Copy link
Owner

ilius commented Jun 9, 2016

Fixed in version 3.0.0

ilius added a commit that referenced this issue Jun 16, 2016
Split into a package with 8 files
Fix bytes/str bugs (fix #54)
Fix CRC check bug (fix #55) by shipping and modifying gzip module:
    https://hg.python.org/cpython/file/3.5/Lib/gzip.py
Migrate to Reader class
Rename bytes and str variables to b_* and u_*
Fix logic and a lot of cleanings
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