python-blosc2 icon indicating copy to clipboard operation
python-blosc2 copied to clipboard

blosc2.open cannot open files containing Chinese characters.

Open lvshifu opened this issue 3 months ago • 1 comments

When using blosc2.open to open a file containing Chinese characters, an error occurs

  • OS: Windows 10
  • blosc2.version '3.10.0'

blosc2.open('E:\456\测试array.b2') Traceback (most recent call last): File "D:\Tools\jetbrains\PyCharm 2025.2.0.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() ^^^^^^ File "", line 1, in File "C:\Projects\test.venv\Lib\site-packages\blosc2\schunk.py", line 1593, in open res = blosc2_ext.open(urlpath, mode, offset, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "blosc2/blosc2_ext.pyx", line 2015, in blosc2.blosc2_ext.open raise RuntimeError(f'blosc2_schunk_open_offset({urlpath!r}, {offset!r}) returned NULL') RuntimeError: blosc2_schunk_open_offset('E:\456\测试array.b2', 0) returned NULL

lvshifu avatar Oct 10 '25 05:10 lvshifu

We did an attempt at fixing this in #502, but for that to work, the underlying C-Blosc2 must need to support Unicode names in files, and this is a major effort. PRs accepted. We also provide commercial support, see: https://www.blosc.org/pages/blosc-in-depth/#support-blosc.

FrancescAlted avatar Oct 14 '25 10:10 FrancescAlted