mutmut
mutmut copied to clipboard
result_browser_layout.tcss is missing in the python package
I tried mutmut browse and it looks like result_browser_layout.tcss is missing in the python package.
❯ hatch run mutmut browse
╭────────────────────────── Traceback (most recent call last) ──────────────────────────╮
│ /home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/inline-snapshot/l │
│ ib/python3.12/site-packages/textual/app.py:2887 in app_prelude │
│ │
│ 2884 │ │ │ │
│ 2885 │ │ │ try: │
│ 2886 │ │ │ │ if self.css_path: │
│ ❱ 2887 │ │ │ │ │ self.stylesheet.read_all(self.css_path) │
│ 2888 │ │ │ │ for read_from, css, tie_breaker, scope in self._get_default_cs │
│ 2889 │ │ │ │ │ self.stylesheet.add_source( │
│ 2890 │ │ │ │ │ │ css, │
│ │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ error = StylesheetError("unable to read CSS file │ │
│ │ '/home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/inl… │ │
│ │ self = ResultBrowser( │ │
│ │ │ title='ResultBrowser', │ │
│ │ │ classes={'-dark-mode'}, │ │
│ │ │ pseudo_classes={'focus', 'dark'} │ │
│ │ ) │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/inline-snapshot/l │
│ ib/python3.12/site-packages/textual/css/stylesheet.py:297 in read_all │
│ │
│ 294 │ │ │ StylesheetParseError: If the CSS is invalid. │
│ 295 │ │ """ │
│ 296 │ │ for path in paths: │
│ ❱ 297 │ │ │ self.read(path) │
│ 298 │ │
│ 299 │ def has_source(self, path: str, class_var: str = "") -> bool: │
│ 300 │ │ """Check if the stylesheet has this CSS source already. │
│ │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ path = PosixPath('/home/frank/.local/share/hatch/env/virtual/inline-snapshot/aN… │ │
│ │ paths = [ │ │
│ │ │ │ │
│ │ PosixPath('/home/frank/.local/share/hatch/env/virtual/inline-snapshot/aN… │ │
│ │ ] │ │
│ │ self = <Stylesheet []> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/inline-snapshot/l │
│ ib/python3.12/site-packages/textual/css/stylesheet.py:282 in read │
│ │
│ 279 │ │ │ │ css = css_file.read() │
│ 280 │ │ │ path = os.path.abspath(filename) │
│ 281 │ │ except Exception: │
│ ❱ 282 │ │ │ raise StylesheetError(f"unable to read CSS file {filename!r}") from │
│ 283 │ │ self.source[(str(path), "")] = CssSource(css, False, 0) │
│ 284 │ │ self._require_parse = True │
│ 285 │
│ │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ filename = '/home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/… │ │
│ │ self = <Stylesheet []> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯ │
╰───────────────────────────────────────────────────────────────────────────────────────╯
StylesheetError: unable to read CSS file
'/home/frank/.local/share/hatch/env/virtual/inline-snapshot/aNUSQRQv/inline-snapshot/lib/
python3.12/site-packages/mutmut/result_browser_layout.tcss'
I think textual is also missing in your requirements.txt.
I had to add it in my project to get to the error above.
Thanks for the report. I am really struggling to include that file in the installed package. It's in the sdist file, but not installed, and it's not in the wheel, and I don't understand why.
YES! I got it to work finally. Version 3.0.5 should work now!