timvink / mkdocs-table-reader-plugin

MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }} to directly insert various table formats into a page
https://timvink.github.io/mkdocs-table-reader-plugin/
MIT License
124 stars 20 forks source link

read_csv() bug introduced with 2.2.0: Positional arguments follow keyword arguments #62

Closed schneekluth closed 5 months ago

schneekluth commented 5 months ago

After installing 2.2.0 I am getting an error while using read_csv() in MKDocs Material. The issue seems to be related to #61 handling positional arguments as a list. In my case I use colalign=().

The statement I use: {{ read_csv('includes/statistics.csv', keep_default_na=False, colalign=('center','center','center','center','center','center','center')) }}

The content of statistics.csv:

"Users","Groups","Roles","Categories","Lifecycles","States","Transitions"
"273","91","29","67","28","77","304"

Version 2.1.0 shows no errors. But since updating to 2.2.0 I get the following response and MKDocs fails to build:

[table-reader-plugin] Make sure the python in your reader tag is correct: Positional arguments follow keyword arguments in ''includes/fnord/vaultdata_statistics.csv', keep_default_na=False, colalign=('center', 
'center', 'center', 'center', 'center', 'center', 'center')'
timvink commented 5 months ago

Thanks for reporting! Will look into this soon

timvink commented 5 months ago

Fixed, making a release now

timvink commented 5 months ago

Release https://github.com/timvink/mkdocs-table-reader-plugin/releases/tag/v2.2.1

Pypi https://pypi.org/project/mkdocs-table-reader-plugin/