Bug#1095173: visidata: vd wrapper stopped working
Raphaël Bleuse
raphael.bleuse at inria.fr
Mon Feb 24 11:59:12 GMT 2025
Hi,
I hope my 2 cents help.
On Tue, 04 Feb 2025 18:57:17 +0000 Markus Koller <markus at snafu.ch> wrote:
> Package: visidata
> Version: 3.0.2-1
> Severity: important
>
> Dear Maintainer,
>
> The wrapper in /usr/bin/vd stopped working and now fails
> with this error:
>
> Traceback (most recent call last):
> File "/usr/bin/vd", line 6, in <module>
> visidata.main.vd_cli()
> ^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'function' object has no attribute 'vd_cli'
>
> This bug was probably introduced with the recent 3.0.2-1 update.
> I couldn't find any upstream issues so I assume it's a packaging problem.
This is likely a bug in upstream, although I did not see any related
issue: installing version 3.0.2 from PyPI in a venv shows the same buggy
behavior.
> The file /usr/lib/python3/dist-packages/visidata/main.py
> does have a 'vd_cli' method, so I'm not sure what's going on.
I think it's a symbol shadowing issue.
The `main` symbol is resolved as the `main` function from `random`.
One can observe this as follows:
$ python
>>> import visidata.main
>>> type(visidata.main)
<class 'function'>
>>> import inspect
>>> inspect.getfile(visidata.main)
'/usr/lib/python3.13/random.py'
> Also /usr/bin/visidata still works fine, but I figured I'd
> set the severity to Important because I assume many users
> only call 'vd' and may not be aware of the alternative 'visidata'
> command. Which also makes me wonder if 'vd' could/should just
> be a symlink to 'visidata' :)
This looks like it has been addressed in newer version of visidata, as
the imports have been reworked (see
https://github.com/saulpw/visidata/commit/85ddd768258c7dab2c95fa9fc79432e558d0c021).
Installing the new version (3.1.1 as of today) in a venv works fine.
Raphaël
More information about the debian-science-maintainers
mailing list