Visidata: [question] Ubuntu 16.04 upgrade issue

Created on 20 Oct 2020  路  2Comments  路  Source: saulpw/visidata

Small description
Ubuntu 16.04 apt upgrade/install fails.

Expected result

Successful install/upgrade.

Actual result with screenshot


(Click to expand code)

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up visidata (2.0.1) ...
  File "/usr/lib/python3/dist-packages/visidata/cmdlog.py", line 44
    fn = f'{prefix}-{i}.vd'
                          ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/deprecated.py", line 10
    msg = f'{func.__name__} deprecated since v{ver}'
                                                   ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/join.py", line 76
    raise Exception(f'inconsistent keys--reload join')
                                                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/_pandas.py", line 35
    raise AttributeError(f"'{self.__class__.__name__}' has no attribute '{k}'")
                                                                             ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/archive.py", line 34
    pwd = vd.input(f'{args[0].filename} is encrypted, enter password: ', display=False)
                                                                      ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/http.py", line 16
    openfunc = vd.getGlobals().get(f'open_{ext}')
                                               ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/mysql.py", line 87
    qstr = f'''
            select
                t.table_name,
                column_count.ncols,
                t.table_rows as est_nrows
            from
                information_schema.tables t,
                (
                    select
                        table_name,
                        count(column_name) as ncols
                    from
                        information_schema.columns
                    where
                        table_schema = '{self.schema}'
                    group by
                        table_name
                ) as column_count
            where
                t.table_name = column_count.table_name;
        '''




















          ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/postgres.py", line 91
    qstr = f'''
            SELECT relname table_name, column_count.ncols, reltuples::bigint est_nrows
                FROM pg_class, pg_namespace, (
                    SELECT table_name, COUNT(column_name) AS ncols FROM information_schema.COLUMNS WHERE table_schema = '{schema}' GROUP BY table_name
                    ) AS column_count
                WHERE  pg_class.relnamespace = pg_namespace.oid AND pg_namespace.nspname = '{schema}' AND column_count.table_name = relname;
        '''  






          ^  
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/loaders/xlsx.py", line 65
    vd.warning(f'{name} saved as {xname}')
                                        ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/main.py", line 142
    vd.error(f'"-{optname}" missing argument')
                                            ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/metasheets.py", line 175
    vd.status(f"added {c.name} to {destSheet}")
                                             ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/movement.py", line 131
    globalCommand(ALT+str(i)[-1], 'jump-sheet-'+str(i), f'vd.push(*(list(s for s in allSheets if s.shortcut==str({i})) or fail("no sheet")))', f'jump to sheet {i}')
                                                                                                                                            ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/pyobj.py", line 301
    name = f'{sheet.name}[{k}]'
                              ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/search.py", line 71
    vd.fail(f'no {sheet.rowtype} where {expr}')
                                             ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/selection.py", line 116
    vd.warning(f'deleted {ndeleted}, expected {nselected}')
                                                         ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/settings.py", line 273
    cls.addCommand(binding, longname, f'vd.{funcname}(sheet)', helpstr, **kwargs)
                                                            ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/sheets.py", line 1002
    vd.confirm(f'quit guarded sheet "{vs.name}?" ')
                                                 ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/visidata/unfurl.py", line 47
    vs = UnfurledSheet(f"{sheet.name}_{clean_id}_unfurled", source=sheet, source_col=col)
                                                         ^
SyntaxError: invalid syntax

dpkg: error processing package visidata (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 visidata
E: Sub-process /usr/bin/dpkg returned an error code (1)

Additional context
Please include the version of VisiData.

2.0.1

question

Most helpful comment

16.04 is supported until 04-2021. The 16.04 repository supports Python 3.5. pip3 install visidata installs 2.0.1, like apt.

If someone else finds this in a Google search, this is how I replaced it with 1.5.2:
sudo apt remove visidata && sudo pip3 install visidata==1.5.2

All 2 comments

Hi @reelsense!

Since v2.0, VisiData requires Python 3.6 and higher! The error you are seeing is related to Python f-strings, which are part of what contribute to the Python 3.6 requirement. Ubuntu 16.04 is EOL, and includes an earlier version of Python which is also EOL.

You can try installing an older version of VisiData through Debian, or pip. I recommend v1.5.2.

16.04 is supported until 04-2021. The 16.04 repository supports Python 3.5. pip3 install visidata installs 2.0.1, like apt.

If someone else finds this in a Google search, this is how I replaced it with 1.5.2:
sudo apt remove visidata && sudo pip3 install visidata==1.5.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

suntzuisafterU picture suntzuisafterU  路  3Comments

frosencrantz picture frosencrantz  路  4Comments

Mikee-3000 picture Mikee-3000  路  4Comments

lxcode picture lxcode  路  3Comments

paulklemm picture paulklemm  路  4Comments