Skip to content

Conversation

@gschizas
Copy link

@gschizas gschizas commented Feb 27, 2024

When using wrapping (i.e. with maxcolwidths) with a column that contains None values, the process crashes with the error TypeError: NoneType takes no arguments.

To solve that, an extra guard case is added, to return None as an empty string instead.

Includes a test.

Fixes #312

@astanin
Copy link
Owner

astanin commented Sep 26, 2024

It should probably use missingval value for consistency not an empty string.

@astanin astanin added the incomplete This PR requires some further changes or modifications before it can be merged. label Sep 27, 2024
@gschizas
Copy link
Author

It should probably use missingval value for consistency not an empty string.

I've updated the pull request

@neerajmorar
Copy link

@astanin any chance of this PR getting merged anytime soon? thanks!

@humzahkiani
Copy link

@astanin would love to see this merged!

@cooper2k4
Copy link

cooper2k4 commented Oct 15, 2025

This problem nags me regularly. Could you give this pull request a new try? What is needed to get it merged?

Edit: Ok, I've just seen #335, so it will maybe get into a new fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

incomplete This PR requires some further changes or modifications before it can be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using maxcolwidths in a column that contains None values, tabulate crashes with "NoneType takes no arguments"

5 participants