breaking on python 2;
See original GitHub issueThis seems to be breaking on python 2.
>>> import beautifultable
>>> t = beautifultable.BeautifulTable()
>>> t.column_headers = ["a", "b", "c"]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/russ/.pyenv/versions/2.7.10/lib/python2.7/site-packages/beautifultable/beautifultable.py", line 231, in __setattr__
super(BeautifulTable, self).__setattr__(name, value)
File "/Users/russ/.pyenv/versions/2.7.10/lib/python2.7/site-packages/beautifultable/beautifultable.py", line 366, in column_headers
raise TypeError("Headers should be of type 'str', not {}".format(type(i)))
TypeError: Headers should be of type 'str', not <type 'str'>
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How can I break out of multiple loops? - Stack Overflow
Introduce a new variable that you'll use as a 'loop breaker'. First assign something to it(False,0, etc.), and then, inside the outer loop,...
Read more >https://docs.python.org/2/tutorial/controlflow.html
No information is available for this page.
Read more >Python break and continue (With Examples) - Programiz
The break statement is used to terminate the loop immediately when it is encountered. The syntax of the break statement is: break. Working...
Read more >Python break statement - Tutorialspoint
It terminates the current loop and resumes execution at the next statement, just like the traditional break statement in C. The most common...
Read more >GitHub Actions Breaking Change: Python 2 being removed ...
Starting April 6, 2020, Python 2 will no longer be offered on any hosted virtual environments. Python 2 was sunset on January 1,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jayvdb Python2 support will be dropped in the next release. It’s going EOL so there is no point in suporting it. I’ll make some cleanup changes in travis, tox, etc in a future commit.
In v0.6.0, there is a constraint that all strings must be unicode as mentioned here. This wasn’t in previous versions and will again be removed in v0.7.0
So in this case you can either replace
with
or add
at the top of the file as a temporary fix.
You could also downgrade to v0.5.3 if you do not need features added in v0.6.0