Closed wwarriner closed 1 year ago
Yes, this bug caught me by surprise also! I think I've already solved it in the latest release (https://github.com/timvink/mkdocs-table-reader-plugin/releases/tag/v1.1.1). Can you check?
This works for me:
wget https://raw.githubusercontent.com/mcnakhaee/palmerpenguins/master/palmerpenguins/data/penguins-raw.csv
mv penguins-raw.csv test.csv
with
from mkdocs_table_reader_plugin.plugin import read_csv
read_csv("test.csv", keep_default_na=False)
And it breaks when I use table-reader
v.1.1.0. with
TypeError: tabulate() got an unexpected keyword argument 'keep_default_na'
Ah I had neglected to try updating the plugin. Let me give that a go.
Thanks a lot for creating the issue and the debugging work you've already done! Really appreciate it. But happy I beat you to it 😉
It looks like it is up to 1.1.0 on conda, which is how we're receiving it. I see it at 1.1.1 on pypi, I'll give that a go for now.
Thanks for the kind words. I learned something from it, so it was worth it!
👍🏻
Thanks for the plugin! We've been using it to great effect in our docs! We noticed a bug recently when we (inadvertently) upgraded to pandas 1.5.1.
Using pandas 1.5.1 we get a TypeError emitted by
tabulate.tabulate()
complaining of an unknown keyword. The error does not occur with 1.4.x.I did some debugging while creating a minimal failing example and it looks like the dynamic kwargs parsing gets
keep_default_na
wrong, i.e., it becomes ato_markdown()
arg instead of aread_csv()
arg.Failing example follows. I believe the file "test.csv" can be an empty file, since we're not testing content, but we tested it on a file with content. Test with pandas 1.5.1 and 1.4.4 to see the difference.
We were surprised by this when our docs build broke out of nowhere. Lesson learned by us: pin package versions!