question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pgcli.packages.tabulate.tabulate is not aware of multiline strings

See original GitHub issue

Test example:

    >>> print(tabulate([["spam", 41.9999], ["new\\nline", "451.0"]], tablefmt="grid"))
    +------+----------+
    | spam |  41.9999 |
    +------+----------+
    | new  | 451      |
    | line |          |
    +------+----------+

But instead of expected output we will get:

    +----------+----------+
    | spam     |  41.9999 |
    +----------+----------+
    | new
    line | 451      |
    +----------+----------+

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
amjithcommented, Dec 15, 2017

I misspoke. It is not fixed by default you still have to make a change in your config file.

Change the table_format to ascii in your config file (~/.config/pgcli/config) and that will support multi-line strings.

0reactions
amjithcommented, Dec 15, 2017

This is now fixed in the latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

alignment error with multiline and unicode · Issue #28 - GitHub
hello :) I found some bug while using alignment and multiline with unicode(Korean) below is simple bug code. Tests (test.py) import tabulate ......
Read more >
Python tabulate: how to achieve auto lining in tabulate?
Yes, it is that way because there are no line returns in the string. I'm guessing the author of the package didn't want...
Read more >
Feature request: Multiline cells and headers - Bitbucket
Is it possible to use the feature by passing in an optional parameter to the tabulate() method? I'm not too concerned by the...
Read more >
ModuleNotFoundError: No module named 'tabulate' in Python
The Python "ModuleNotFoundError: No module named 'tabulate'" occurs when we forget to install the tabulate module before importing it or ...
Read more >
CLI Helpers Documentation - Read the Docs
CLI Helpers is a Python package that makes it easy to perform common tasks when building ... CLI Helpers provides a simple way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found