nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

beautifulsoup4 derivation failing with AttributeError

Open kpritam opened this issue 4 years ago • 3 comments

darwin-rebuild switch --flake .#MacBookPro

command started failing after nix flake update.

error: builder for '/nix/store/95b5wlyw3qlh1ai8c9dx2i5y886vhvwd-python3.9-beautifulsoup4-4.10.0.drv' failed with exit code 1;
       last 10 log lines:
       >         soup = self.soup(markup)
       > >       self.assertEqual('Sacr\xe9 bleu!', soup.root.string)
       > E       AttributeError: 'NoneType' object has no attribute 'string'
       >
       > bs4/testing.py:1002: AttributeError
       > =========================== short test summary info ============================
       > FAILED bs4/tests/test_lxml.py::LXMLTreeBuilderSmokeTest::test_real_hebrew_document
       > FAILED bs4/tests/test_lxml.py::LXMLTreeBuilderSmokeTest::test_smart_quotes_converted_on_the_way_in
       > FAILED bs4/tests/test_lxml.py::LXMLXMLTreeBuilderSmokeTest::test_can_parse_unicode_document
       > ======================== 3 failed, 514 passed in 2.20s =========================
       For full logs, run 'nix log /nix/store/95b5wlyw3qlh1ai8c9dx2i5y886vhvwd-python3.9-beautifulsoup4-4.10.0.drv'.
error: 1 dependencies of derivation '/nix/store/s29j0l0v7y3aypyspm1cn5djr8h2viwk-python3.9-furo-2021.8.11b42.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pcz5i5m04jp5ndm5cyiil2a5spzar7f9-kitty-0.23.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1z4qqkk33h1b9f5a17r49v9sq3qw78c8-set-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dqyp8rngnw8gbw88zw4qmisribklkr9p-system-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6pfbvnav5gc8mni1v0dv3hb6jzxs0zm1-darwin-system-21.11.20210920.1a56d76+darwin4.e1a3f72.drv' failed to build

kpritam avatar Sep 25 '21 14:09 kpritam

I've also run into this exact issue after a recent update. I've worked around it by commenting out or replacing usages of kitty from nixpkgs, but that's no fix. Assuming this is coming from your flake's usage of kitty too (it looks like that's the case, based on the list of dependencies), you might be able to work around it by doing something similar.

https://github.com/montchr/dotfield/blob/e60ce1d90ebbaf8bcf6e6af90186fe4c14d77d45/modules/kitty/default.nix#L87-L92

[Edit: Updated link because TERMINFO_DIRS still needs to include info for kitty, else home-manager will fail]

However, I'd guess this isn't specific to nix-darwin, and that it's likely due to a change in nixpkgs.

astratagem avatar Sep 27 '21 17:09 astratagem

Running into this when I add Ansible.

rch avatar Sep 29 '21 17:09 rch

There is already an issue about this https://github.com/NixOS/nixpkgs/pull/138059 & a merged PR that should fix this https://github.com/NixOS/nixpkgs/pull/137870

ahmedelgabri avatar Oct 09 '21 19:10 ahmedelgabri