Error performing BAT pack: File is compressed with ZStandard, install the zstandard module to support this. #104255

Closed
opened 2023-09-04 20:46:31 +02:00 by Karen-6 · 9 comments

System Information
Operating System(s): Linux (Fedora 35)

Flamenco Version
Is Broken: 3.2
Worked OK: Never

Short description of error

Whenever I try to render anything with Flamenco (even the default Blender scene of a single cube), I immediately get:

Error packing with BAT: File is compressed with ZStandard, install the zstandard module to support this.
Error performing BAT pack: File is compressed with ZStandard, install the zstandard module to support this.
Error: Error performing BAT pack: File is compressed with ZStandard, install the zstandard module to support this.

zstandard is installed, both on my local machine and the server, both through pip and through the system packages python3-zstandard, python3-zstd, and zstd. I can run python3 and import "zstandard" with no problems.

Exact steps for others to reproduce the error

Heck if I know!

**System Information** Operating System(s): Linux (Fedora 35) **Flamenco Version** Is Broken: 3.2 Worked OK: Never **Short description of error** Whenever I try to render anything with Flamenco (even the default Blender scene of a single cube), I immediately get: _Error packing with BAT: File is compressed with ZStandard, install the `zstandard` module to support this. Error performing BAT pack: File is compressed with ZStandard, install the `zstandard` module to support this. Error: Error performing BAT pack: File is compressed with ZStandard, install the `zstandard` module to support this._ zstandard *is* installed, both on my local machine and the server, both through pip and through the system packages python3-zstandard, python3-zstd, and zstd. I can run python3 and import "zstandard" with no problems. **Exact steps for others to reproduce the error** Heck if I know!
Author

ED: Another related ticket:

#104243 (comment)

ED: Another related ticket: https://projects.blender.org/studio/flamenco/issues/104243#issuecomment-1013259
Author

ED: My Blender version is 3.2.1 (the most recent available with Fedora 35).

ED: My Blender version is 3.2.1 (the most recent available with Fedora 35).

Thanks for the clear bug report, that helps :)

This is strange. I suspect that it has something to do with the packaging of Blender on Fedora. I'm not running Fedora myself, though, so we'll have to do a bit of digging.

zstandard is installed, both on my local machine and the server, both through pip and through the system packages python3-zstandard, python3-zstd, and zstd. I can run python3 and import "zstandard" with no problems.

This is good to know. Now we have to figure out whether Blender-on-Fedora uses the system Python, and whether it can import zstandard.

In Blender itself, in the Python console, could you try import zstandard? And what does it show when you type sys.executable?

Thanks for the clear bug report, that helps :) This is strange. I suspect that it has something to do with the packaging of Blender on Fedora. I'm not running Fedora myself, though, so we'll have to do a bit of digging. > zstandard is installed, both on my local machine and the server, both through pip and through the system packages python3-zstandard, python3-zstd, and zstd. I can run python3 and import "zstandard" with no problems. This is good to know. Now we have to figure out whether Blender-on-Fedora uses the system Python, and whether it can import zstandard. In Blender itself, in the Python console, could you try `import zstandard`? And what does it show when you type `sys.executable`?
Author

Weird, I replied here, ,but I don't see my reply? Anyway, that was a great idea - it does throw an error (unlike from a normal python shell!)

import zstandard
Traceback (most recent call last):
File "/usr/lib64/python3.10/code.py", line 90, in runcode
exec(code, self.locals)
File "<blender_console>", line 1, in
File "/usr/lib64/python3.10/site-packages/zstandard/init.py", line 39, in
from .backend_c import * # type: ignore
ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10502 returned by the lib, 10501 hardcoded in zstd headers, 10501 hardcoded in the cext)

Here's my system packages:

libzstd-1.5.2-2.fc35.x86_64
python3-zstandard-0.17.0-1.fc35.x86_64
zstd-1.5.2-2.fc35.x86_64
python3-zstd-1.4.5.1-5.fc35.x86_64

And my pip packages:

Name: zstandard
Version: 0.21.0
Summary: Zstandard bindings for Python
Home-page: https://github.com/indygreg/python-zstandard
Author: Gregory Szorc
Author-email: gregory.szorc@gmail.com
License: BSD
Location: /home/meme/.local/lib/python3.10/site-packages
Requires:
Required-by: bpy

Name: zstd
Version: 1.4.5.1
Summary: ZSTD Bindings for Python
Home-page: https://github.com/sergey-dryabzhinsky/python-zstd
Author: Sergey Dryabzhinsky, Anton Stuk
Author-email: sergey.dryabzhinsky@gmail.com
License: BSD
Location: /usr/lib64/python3.10/site-packages
Requires:
Required-by:

Weird, I replied here, ,but I don't see my reply? Anyway, that was a great idea - it does throw an error (unlike from a normal python shell!) >>> import zstandard Traceback (most recent call last): File "/usr/lib64/python3.10/code.py", line 90, in runcode exec(code, self.locals) File "<blender_console>", line 1, in <module> File "/usr/lib64/python3.10/site-packages/zstandard/__init__.py", line 39, in <module> from .backend_c import * # type: ignore ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10502 returned by the lib, 10501 hardcoded in zstd headers, 10501 hardcoded in the cext) Here's my system packages: libzstd-1.5.2-2.fc35.x86_64 python3-zstandard-0.17.0-1.fc35.x86_64 zstd-1.5.2-2.fc35.x86_64 python3-zstd-1.4.5.1-5.fc35.x86_64 And my pip packages: Name: zstandard Version: 0.21.0 Summary: Zstandard bindings for Python Home-page: https://github.com/indygreg/python-zstandard Author: Gregory Szorc Author-email: gregory.szorc@gmail.com License: BSD Location: /home/meme/.local/lib/python3.10/site-packages Requires: Required-by: bpy Name: zstd Version: 1.4.5.1 Summary: ZSTD Bindings for Python Home-page: https://github.com/sergey-dryabzhinsky/python-zstd Author: Sergey Dryabzhinsky, Anton Stuk Author-email: sergey.dryabzhinsky@gmail.com License: BSD Location: /usr/lib64/python3.10/site-packages Requires: Required-by:

that was a great idea - it does throw an error (unlike from a normal python shell!)

Yup, Blender comes with its own Python.

import zstandard
Traceback (most recent call last):
File "/usr/lib64/python3.10/code.py", line 90, in runcode
exec(code, self.locals)
File "<blender_console>", line 1, in
File "/usr/lib64/python3.10/site-packages/zstandard/init.py", line 39, in

This is the issue -- Blender tries to load the system zstandard module instead of its own.

from .backend_c import *  # type: ignore

ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10502 returned by the lib, 10501 hardcoded in zstd headers, 10501 hardcoded in the cext)

and the system version is different from the version Blender expects.

What is the output of blender -b --python-expr 'import pprint, sys; pprint.pprint(sys.path)' on your system? On mine it's this:

Color management: using fallback mode for management
Blender 4.0.0 Alpha
Read prefs: "/home/sybren/.config/blender/4.0/config/userpref.blend"
['/home/sybren/.config/blender/4.0/scripts/startup',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/startup',
 '/home/sybren/.config/blender/4.0/scripts/addons/flamenco/wheels/python_dateutil-2.8.2-py2.py3-none-any.whl',
 '/home/sybren/.config/blender/4.0/scripts/addons/flamenco/wheels/six-1.16.0-py2.py3-none-any.whl',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/modules',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python310.zip',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10/lib-dynload',
 '/home/sybren/.local/lib/python3.10/site-packages',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10/site-packages',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons/modules',
 '/home/sybren/.config/blender/4.0/scripts/addons/modules',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons',
 '/home/sybren/.config/blender/4.0/scripts/addons',
 '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons_contrib']

Blender quit
> that was a great idea - it does throw an error (unlike from a normal python shell!) Yup, Blender comes with its own Python. > >>> import zstandard > Traceback (most recent call last): > File "/usr/lib64/python3.10/code.py", line 90, in runcode > exec(code, self.locals) > File "<blender_console>", line 1, in <module> > File "/usr/lib64/python3.10/site-packages/zstandard/__init__.py", line 39, in <module> This is the issue -- Blender tries to load the system zstandard module instead of its own. > from .backend_c import * # type: ignore > ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10502 returned by the lib, 10501 hardcoded in zstd headers, 10501 hardcoded in the cext) and the system version is different from the version Blender expects. What is the output of `blender -b --python-expr 'import pprint, sys; pprint.pprint(sys.path)'` on your system? On mine it's this: ``` Color management: using fallback mode for management Blender 4.0.0 Alpha Read prefs: "/home/sybren/.config/blender/4.0/config/userpref.blend" ['/home/sybren/.config/blender/4.0/scripts/startup', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/startup', '/home/sybren/.config/blender/4.0/scripts/addons/flamenco/wheels/python_dateutil-2.8.2-py2.py3-none-any.whl', '/home/sybren/.config/blender/4.0/scripts/addons/flamenco/wheels/six-1.16.0-py2.py3-none-any.whl', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/modules', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python310.zip', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10/lib-dynload', '/home/sybren/.local/lib/python3.10/site-packages', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/python/lib/python3.10/site-packages', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons/modules', '/home/sybren/.config/blender/4.0/scripts/addons/modules', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons', '/home/sybren/.config/blender/4.0/scripts/addons', '/home/sybren/workspace/blender-git/build_linux/bin/4.0/scripts/addons_contrib'] Blender quit ```
Author

[user@host ~]$ blender -b --python-expr 'import pprint, sys; pprint.pprint(sys.path)'
Blender 3.2.1 (hash unknown built 2022-07-10 00:00:00)
BLT_lang_init: 'locale' data path for translations not found, continuing
Read prefs: /home/user/.config/blender/3.2/config/userpref.blend
['/usr/share/blender/3.2/scripts/startup',
'/usr/share/blender/3.2/scripts/modules',
'/usr/lib64/python310.zip',
'/usr/lib64/python3.10',
'/usr/lib64/python3.10/lib-dynload',
'/usr/lib64/python3.10/site-packages',
'/usr/lib/python3.10/site-packages',
'/usr/share/blender/3.2/scripts/freestyle/modules',
'/usr/share/blender/3.2/scripts/addons/modules',
'/home/user/.config/blender/3.2/scripts/addons/modules',
'/usr/share/blender/3.2/scripts/addons',
'/home/user/.config/blender/3.2/scripts/addons']

Blender quit

[user@host ~]$ blender -b --python-expr 'import pprint, sys; pprint.pprint(sys.path)' Blender 3.2.1 (hash unknown built 2022-07-10 00:00:00) BLT_lang_init: 'locale' data path for translations not found, continuing Read prefs: /home/user/.config/blender/3.2/config/userpref.blend ['/usr/share/blender/3.2/scripts/startup', '/usr/share/blender/3.2/scripts/modules', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/usr/lib64/python3.10/site-packages', '/usr/lib/python3.10/site-packages', '/usr/share/blender/3.2/scripts/freestyle/modules', '/usr/share/blender/3.2/scripts/addons/modules', '/home/user/.config/blender/3.2/scripts/addons/modules', '/usr/share/blender/3.2/scripts/addons', '/home/user/.config/blender/3.2/scripts/addons'] Blender quit
Karen-6 reopened this issue 2023-09-08 23:25:01 +02:00
Author

Whoops, didn't mean to close it!

Whoops, didn't mean to close it!

['/usr/share/blender/3.2/scripts/startup',
'/usr/share/blender/3.2/scripts/modules',
'/usr/lib64/python310.zip',
'/usr/lib64/python3.10',
'/usr/lib64/python3.10/lib-dynload',
'/usr/lib64/python3.10/site-packages',
'/usr/lib/python3.10/site-packages',
'/usr/share/blender/3.2/scripts/freestyle/modules',
'/usr/share/blender/3.2/scripts/addons/modules',
'/home/user/.config/blender/3.2/scripts/addons/modules',
'/usr/share/blender/3.2/scripts/addons',
'/home/user/.config/blender/3.2/scripts/addons']

This is what's going on -- this Blender build doesn't use Blender's own Python, but uses the system Python instead. Apparently they didn't test well with the zstandard module. I can recommend downloading Blender from https://www.blender.org/download/ instead.

> ['/usr/share/blender/3.2/scripts/startup', > '/usr/share/blender/3.2/scripts/modules', > '/usr/lib64/python310.zip', > '/usr/lib64/python3.10', > '/usr/lib64/python3.10/lib-dynload', > '/usr/lib64/python3.10/site-packages', > '/usr/lib/python3.10/site-packages', > '/usr/share/blender/3.2/scripts/freestyle/modules', > '/usr/share/blender/3.2/scripts/addons/modules', > '/home/user/.config/blender/3.2/scripts/addons/modules', > '/usr/share/blender/3.2/scripts/addons', > '/home/user/.config/blender/3.2/scripts/addons'] This is what's going on -- this Blender build doesn't use Blender's own Python, but uses the system Python instead. Apparently they didn't test well with the `zstandard` module. I can recommend downloading Blender from https://www.blender.org/download/ instead.
Sybren A. Stüvel added the
Type
Report
label 2023-09-11 10:41:41 +02:00

I'm going to close this issue. Feel free to open it if it turns out to be actually a problem with Flamenco, and not with any particular Blender build.

I'm going to close this issue. Feel free to open it if it turns out to be actually a problem with Flamenco, and not with any particular Blender build.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/flamenco#104255
No description provided.