jonashaag / klaus

docker run klaus / pip install klaus — the first Git web viewer that Just Works™.
http://klausdemo.lophus.org
Other
685 stars 102 forks source link

klaus 3.0.0 fails with ImportError: cannot import name 'check_have_exuberant_ctags' from 'klaus.ctagsutils' #330

Closed sbraz closed 5 months ago

sbraz commented 5 months ago

Hi, I think you accidentally renamed a function in 36a6d2c617f1120fe5a58007d796a74e55ea428b. Or you forgot to update https://github.com/jonashaag/klaus/blob/421a481af985383df556a79defa32d603aa22808/klaus/cli.py#L105-L112 I would fine a PR to fix either file but I don't know what's best. In any case, klaus 3.0.0 doesn't work as-is:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/klaus", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/klaus/cli.py", line 105, in main
    from klaus.ctagsutils import check_have_exuberant_ctags
ImportError: cannot import name 'check_have_exuberant_ctags' from 'klaus.ctagsutils' (/usr/lib/python3.12/site-packages/klaus/ctagsutils.py)
jonasius commented 5 months ago

If I try to build the docker container, it fails to install some of the python packages

ERROR: failed to solve: process "/bin/sh -c apk add --no-cache python3-dev py3-pip gcc musl-dev && pip3 install python-ctags3 && apk del python3-dev gcc musl-dev" did not complete successfully: exit code: 1

According to your error it could be the python-ctags3 which fails to install.

sbraz commented 5 months ago

This is an unrelated issue. A function relating to ctags was renamed and it causes klaus to fail to start with ctags enabled, even if the ctags package is installed.

jonashaag commented 5 months ago

Should be renamed to check_have_compatible_ctags

I wonder why this isn't covered in the tests :(