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.

--all flag fails to produce output

See original GitHub issue

The standard: “python list_lambdas.py” command completes successfully, but if I add the “–all” flag the following message is produced:

python list_lambdas.py --all
100% (15 of 15) |#############################################################################################################################| Elapsed Time: 0:00:23 Time: 0:00:23
Traceback (most recent call last):
  File "list_lambdas.py", line 251, in <module>
    print_lambda_list(arguments)
  File "list_lambdas.py", line 191, in print_lambda_list
    print(table.table)
  File "C:\Python36\lib\site-packages\terminaltables\base_table.py", line 216, in table
    dimensions = max_dimensions(self.table_data, self.padding_left, self.padding_right)[:3]
  File "C:\Python36\lib\site-packages\terminaltables\width_and_alignment.py", line 106, in max_dimensions
    inner_heights[j] = max(inner_heights[j], cell.count('\n') + 1)
TypeError: a bytes-like object is required, not 'str'

I’m on Windows 10 with Python 3.6.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nshapcommented, Apr 18, 2018

Problem reproduced with Python 3. It is because the “Description” field is byte instead of string: image

I believe removing the encode('utf-8') should fix that. Creating a fix.

0reactions
nshapcommented, Apr 18, 2018

Fixed by #10.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue on adding werror flag - Stack Overflow
But when I am adding Werror flag in some ". mk" files, compilation is failing with some error. But in the successful build...
Read more >
Gomplate produce output file when parsing fails #578 - GitHub
gomplate using an input template with reference to an environment variable that doesn't exist, still writes an output file. Your environment.
Read more >
Understanding and Using Makefile Flags - Earthly Blog
First, just like any other makefile variable, these flags can be overridden when invoking make from the command line.
Read more >
Useful gfortran flags — AMath 483/583, Spring 2013 1.0 ...
Output flags ​​ This flag is useful if your program source code is split into multiple files. The object files produced by this...
Read more >
About Flags - Apache C++ Standard Library
Note that the flag std::ios_base::goodbit is not represented by any one bit; its value, 0 , indicates the absence of any error flag....
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