| Summary: | sysutils/ansible: probably missing py-toml dependency | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Mikael Urankar <mikael> |
| Component: | Individual Port(s) | Assignee: | Mateusz Piotrowski <0mp> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | matthew |
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(0mp) |
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Mikael Urankar
2023-05-02 11:53:52 UTC
I ran into exactly this problem myself. What happened in my case was that py-toml had been installed, and then deleted, but had left behind a directory containing some .pyc files. This was enough to fool python into thinking the toml module was installed, but it had no actual code available to run. Ansible can use any out of about three alternative modules to provide TOML functionality. The port defaults to py-tomli, but the ansible code will use py-toml in preference, if it happens to be installed. If you delete the py-toml module, and then manually remove /usr/local/lib/python3.9/site-packages/toml ansible should work properly again (for values of 3.9 equal to the version of python you've installed...) This is fallout from the attempt to dynamically generate python cache files at package install time. That change has been reverted, so all the .pyc files should be prt of the pkgs you install. It's worthwhile scanning all the files under site-packages and deleting anything _not_ recognised by `pkg which`, possible with judicious re-installation of any affected python modules. (In reply to Matthew Seaman from comment #1) You're right, thanks for the explanation! |