You are not logged in.

#1 2020-12-22 20:24:44

kwehmu
Member
Registered: 2013-08-04
Posts: 15

[SOLVED] Python ModuleNotFoundError with khal and khard

I just installed 'khal' and 'khard' (command line calendar and contacts managers) to give them a try, but when I try to run either one, I get a 'ModuleNotFoundError' for a module named 'validate':

% khal --help
Traceback (most recent call last):
  File "/usr/bin/khal", line 2, in <module>
    from khal.cli import main_khal
  File "/usr/lib/python3.9/site-packages/khal/cli.py", line 35, in <module>
    from .settings import InvalidSettingsError, get_config
  File "/usr/lib/python3.9/site-packages/khal/settings/__init__.py", line 1, in <module>
    from .settings import get_config  # noqa
  File "/usr/lib/python3.9/site-packages/khal/settings/settings.py", line 30, in <module>
    from validate import Validator
ModuleNotFoundError: No module named 'validate'

% khard --help
Traceback (most recent call last):
  File "/usr/bin/khard", line 33, in <module>
    sys.exit(load_entry_point('khard==0.17.0', 'console_scripts', 'khard')())
  File "/usr/bin/khard", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/khard/khard.py", line 21, in <module>
    from . import cli
  File "/usr/lib/python3.9/site-packages/khard/cli.py", line 10, in <module>
    from .config import Config, ConfigError
  File "/usr/lib/python3.9/site-packages/khard/config.py", line 12, in <module>
    import validate
ModuleNotFoundError: No module named 'validate'

Can anyone else reproduce this issue?

It looks like the 'validate' module should be provided by the 'python-configobj' package, which is a dependency of the 'khal' and 'khard' packages that was installed when I installed them. The 'python-configobj' package was updated yesterday to version 5.0.6-10, so maybe the 'khard' and 'khal' packages need to be rebuilt. I can reach out to the maintainer; it would just be nice for someone else to reproduce the issue first so that I know it's not just something wrong with my particular system.

Last edited by kwehmu (2020-12-22 22:05:00)

Offline

#2 2020-12-22 21:19:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Python ModuleNotFoundError with khal and khard

There's already a bug report here:
https://bugs.archlinux.org/task/69057
This was previously discussed here:
https://bbs.archlinux.org/viewtopic.php?id=261906
A fixed version of python-configobj should be coming soon.

In the meantime, either downgrade, or build your own patched version following the instructions in the linked thread.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-12-22 22:04:43

kwehmu
Member
Registered: 2013-08-04
Posts: 15

Re: [SOLVED] Python ModuleNotFoundError with khal and khard

Thanks. I'll try building the package myself or just wait for the fix. (I can't downgrade because the first version I installed is the broken version.)

Offline

#4 2020-12-22 22:13:56

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Python ModuleNotFoundError with khal and khard

kwehmu wrote:

I can't downgrade because the first version I installed is the broken version.

Of course you can...
https://wiki.archlinux.org/index.php/Do … g_packages


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2020-12-22 22:50:22

kwehmu
Member
Registered: 2013-08-04
Posts: 15

Re: [SOLVED] Python ModuleNotFoundError with khal and khard

Oh, thanks so much! When I first started using Arch Linux and learned how to use pacman, the Arch Linux Archive at archive.archlinux.org didn't exist, and for some reason, I never heard about it until your comment. (When I started using Arch many years ago, I think there was some sort of archive (maybe an unofficial one?), but official packages weren't signed (or only some were?) and/or the archive wasn't available over TLS, so I didn't feel comfortable using it. I thought I either had to rely on my local package cache or manually build old versions.)

Last edited by kwehmu (2020-12-22 22:52:00)

Offline

Board footer

Powered by FluxBB