Giter Site home page Giter Site logo

Comments (6)

saulpw avatar saulpw commented on June 2, 2024 1

Well, I guess you'd search for the error message and come across this issue. In general I don't want to add specific code to VisiData to show pretty error messages for every possible environmental problem.

from visidata.

bnisly avatar bnisly commented on June 2, 2024

The pip install version works.

conda create -n visidata -y python=3.12
conda activate visidata
pip install visidata

type -a visidata
visidata is /opt/homebrew/Caskroom/miniconda/base/envs/visidata/bin/visidata
visidata is /opt/homebrew/bin/visidata
type -a vd
vd is /opt/homebrew/Caskroom/miniconda/base/envs/visidata/bin/vd
vd is /opt/homebrew/bin/vd

vd foo.csv
saul.pw/VisiData v3.0.2
opening foo.csv as csv

from visidata.

saulpw avatar saulpw commented on June 2, 2024

It looks like astanin/python-tabulate v0.9 as packaged with Brew should have that attribute, so you might have a different version of the tabulate library installed on your system. I've fixed VisiData so at least it doesn't bomb out in this case, but I don't think there's much else we can do.

from visidata.

bnisly avatar bnisly commented on June 2, 2024

Thanks, @saulpw. I brew installed python-tabulate since it was not installed and now it's working.

Do you need to add that as a dependency to visidata?

from visidata.

saulpw avatar saulpw commented on June 2, 2024

We deliberately do not install the dependencies for every format, since that would increase the installation time and footprint substantially. (The brew package installs the deps for xls/xlsx/html and that's all.) If people want to petition for the tabulate savers to be available by default, we can certainly entertain that idea.

But also, I believe you must have had a different tabulate library installed, or it should have blithely ignored it (as a ModuleNotFoundError on the import). Was that not the case?

from visidata.

bnisly avatar bnisly commented on June 2, 2024

Yes, I do. Given the error, how would I know to install python-tabulate?

/usr/local/Cellar:
for i in $(tree -if | grep -w tabulate.py ); do echo $i; grep tabulate_formats $i; done
./grip/4.6.1_1/libexec/lib/python3.10/site-packages/pip/_vendor/rich/tabulate.py
./httpie/3.2.1/libexec/lib/python3.10/site-packages/pip/_vendor/rich/tabulate.py
./mdv/1.7.4/libexec/lib/python3.8/site-packages/mdv/tabulate.py
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
tabulate_formats = list(sorted(_table_formats.keys()))
     'latex', and 'latex_booktabs'. Variable `tabulate_formats` contains the list of
            if value not in tabulate_formats:
./mdv/1.7.4/libexec/lib/python3.8/site-packages/tabulate.py
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
tabulate_formats = list(sorted(_table_formats.keys()))
    'latex', 'latex_raw' and 'latex_booktabs'. Variable `tabulate_formats`
            if value not in tabulate_formats:
./pypy3/7.3.9/libexec/site-packages/pip-22.0.4-py3.7.egg/pip/_vendor/rich/tabulate.py
./rich-cli/1.8.0/libexec/lib/python3.10/site-packages/pip/_vendor/rich/tabulate.py

/opt/homebrew/Cellar:
for i in $(tree -if | grep -w tabulate.py ); do echo $i; grep tabulate_formats $i; done
./mdv/1.7.5/libexec/lib/python3.12/site-packages/mdv/tabulate.py
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
tabulate_formats = list(sorted(_table_formats.keys()))
     'latex', and 'latex_booktabs'. Variable `tabulate_formats` contains the list of
            if value not in tabulate_formats:

from visidata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.