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
fromansitableimportANSITable, Column, Celltable=ANSITable("col1", "column 2 has a big header", "column 3")
table.row("aaaaaaaaa", 2.2, 3)
table.row("bbbbbbbbbbbbb", Cell(-5.5, bgcolor="blue"), 6, bgcolor="yellow")
table.row("ccccccc", 8.8, 9)
table.print()
Results in the following using the current master of ansitable:
[fedora]$ python3 test.py
Traceback (most recent call last):
File "/home/bluecmd/work/linkinsane/test.py", line 7, in <module>
table.print()
File "/home/bluecmd/work/linkinsane/ansitable/table.py", line 828, in print
print(str(self), file=file)
^^^^^^^^^
File "/home/bluecmd/work/linkinsane/ansitable/table.py", line 870, in __str__
text += self._row(i) # add a row
^^^^^^^^^^^^
File "/home/bluecmd/work/linkinsane/ansitable/table.py", line 788, in _row
text += c._formatcolumn(
^^^^^^^^^^^^^^^^
File "/home/bluecmd/work/linkinsane/ansitable/table.py", line 266, in _formatcolumn
text = self.table.BG(bgcolor) + text + self.table.BG(0)
^^^^^^^^^^^^^
AttributeError: 'ANSITable' object has no attribute 'BG'. Did you mean: '_BG'?
It is the same issue with using fgcolor, with the error being that no attribute named FG exists.
The text was updated successfully, but these errors were encountered:
OK, I think this might be an issue with the package colored which might not be up to date. I am using v2.2.4 and there were breaking changes between v1 and v2, that got fixed in later minor releases of v2. For that reason I didn't put a version dependency in the build file, perhaps I should have.
Using the example from the README:
Results in the following using the current master of ansitable:
It is the same issue with using fgcolor, with the error being that no attribute named
FG
exists.The text was updated successfully, but these errors were encountered: