You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
visidata needs a specific version of the xport package to open XPT files, but this isn't specified in the requirements anywhere
Expected result
Should open xpt files.
Actual result with screenshot
Traceback (most recent call last):
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/visidata/threads.py", line 220, in _toplevelTryFunc
t.status = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/visidata/sheets.py", line 260, in reload
self.loader()
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/visidata/sheets.py", line 285, in loader
for r in self.iterload():
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/visidata/loaders/sas.py", line 25, in iterload
for i, var in enumerate(self.rdr._variables):
^^^^^^^^^^^^^^^^^^^
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/xport/__init__.py", line 849, in __getattr__
return getattr(self.dataset, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/pandas/core/generic.py", line 5487, in __getattr__
return object.__getattribute__(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Member' object has no attribute '_variables'
My locally installed versions of visidata and xport are as follows:
$ pip show xport
Name: xport
Version: 3.6.1
Summary: SAS XPORT file reader
Home-page: https://github.com/selik/xport
Author: Michael Selik
Author-email: [email protected]
License: MIT
Location: /Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages
Requires: click, pandas, pyyaml
Required-by:
$ pip show visidata
Name: visidata
Version: 3.0.2
Summary: terminal interface for exploring and arranging tabular data
Home-page: https://visidata.org
Author: Saul Pwanson
Author-email: [email protected]
License: GPLv3
Location: /Users/vaibhav/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages
Requires: importlib-metadata, python-dateutil
Required-by:
As a side note, while investigating the xport v2 format, I noticed the .xpt loader has a bug. It will cause inability to edit cells, and possibly odd behavior when selecting rows. I've proposed a fix here: #2365
If you run into such problems, you may want to apply that fix. If not, an alternate workaround would be to save .xpt files right after opening them, in some other format (like .tsv or .json). Then reopen the new .tsv file in visidata.
Small description
visidata needs a specific version of the
xport
package to open XPT files, but this isn't specified in the requirements anywhereExpected result
Should open xpt files.
Actual result with screenshot
My locally installed versions of visidata and xport are as follows:
Steps to reproduce with sample data and a .vd
https://github.com/prasertcbs/basic-dataset/blob/8c80eb454b2defd3db217d8f95883eb6a1e3f263/brakes.xpt
pip install 'xport<3'
, visidata opens the file just fine.Additional context
Please include the version of VisiData and Python.
Visidata version included above.
Python version:
The text was updated successfully, but these errors were encountered: