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

UnicodeDecodeError: 'utf-8' codec can't decode byte #97

Open
ztmr opened this issue Apr 7, 2024 · 0 comments
Open

UnicodeDecodeError: 'utf-8' codec can't decode byte #97

ztmr opened this issue Apr 7, 2024 · 0 comments

Comments

@ztmr
Copy link

ztmr commented Apr 7, 2024

$ nix run nixpkgs#vulnix -- -S
Traceback (most recent call last):
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/bin/.vulnix-wrapped", line 9, in <module>
sys.exit(main())
^^^^^^
File "/nix/store/fslvacr1jmwrlhmf5dnc4avgfg4zvz92-python3.11-click-8.1.7/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/fslvacr1jmwrlhmf5dnc4avgfg4zvz92-python3.11-click-8.1.7/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/nix/store/fslvacr1jmwrlhmf5dnc4avgfg4zvz92-python3.11-click-8.1.7/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/fslvacr1jmwrlhmf5dnc4avgfg4zvz92-python3.11-click-8.1.7/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/lib/python3.11/site-packages/vulnix/main.py", line 157, in main
populate_store(store, gc_roots, profile,  paths)
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/lib/python3.11/site-packages/vulnix/main.py", line 60, in populate_store
store.add_path(path)
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/lib/python3.11/site-packages/vulnix/nix.py", line 134, in add_path
self.update(candidate)
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/lib/python3.11/site-packages/vulnix/nix.py", line 142, in update
drv_obj = load(drv_path)
^^^^^^^^^^^^^^
File "/nix/store/pa56ndfzj1a0i9gaflch2dibxpbxmsra-vulnix-1.10.1-unstable-2024-04-02/lib/python3.11/site-packages/vulnix/derivation.py", line 32, in load
d_obj = eval(f.read(), {'__builtins__': {}, 'Derive': Derive}, {})
^^^^^^^^
File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 3292: invalid start byte
$ 
$ 
$ nix run nixpkgs#vulnix -- --version
vulnix 1.10.2.dev0
$ 
$ 
$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8
$

Tried setting Python-specific Unicode variables, using C.UTF-8 locale, etc. nothing helps. Tried with stable NixOS, unstable and master as well.

If I run Vulnix with -R, it is not failing, but obviously not doing what I wanted -- a full scan including deps...

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

No branches or pull requests

1 participant