tomduck / pandoc-tablenos

A pandoc filter for numbering tables and table references.
GNU General Public License v3.0
108 stars 8 forks source link

TypeError: unsupported operand type(s) for +=: 'dict' and 'list' #22

Closed hborchew closed 4 years ago

hborchew commented 4 years ago

I am getting this error. Any ideas?

Traceback (most recent call last): File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\program files\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\hborchew\AppData\Roaming\Python\Python38\Scripts\pandoc-xnos.exe__main__.py", line 7, in File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandocxnos\main.py", line 38, in main m.main(stdin, stdout) File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandoc_tablenos.py", line 664, in main altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta), File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandoc_tablenos.py", line 664, in altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta), File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandocfilters.py", line 110, in walk res = action(item['t'], File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandoc_tablenos.py", line 335, in process_tables _adjust_caption(fmt, table, value) File "C:\Users\hborchew\AppData\Roaming\Python\Python38\site-packages\pandoc_tablenos.py", line 250, in _adjust_caption value[1] += tmp TypeError: unsupported operand type(s) for +=: 'dict' and 'list' Error running filter pandoc-xnos: Filter returned error status 1

tomduck commented 4 years ago

Thanks for this report. Yes, I see where the problem is. Please update to pandoc-tablenos 2.2.2 (just released) and it should be fixed.

Cheers, Tom

hborchew commented 4 years ago

Tom,

Thanks for the swift response. Works now.

Howard

tomduck commented 4 years ago

Great! Thanks for letting me know, Howard.

Cheers, Tom

hborchew commented 4 years ago

Tom,

Is it possible to build a self-contained pandoc-xnos for Windows executable so my users do not need to install Python, the package, etc.?

Thanks, Howard

On Fri, Aug 7, 2020 at 7:00 PM Thomas J. Duck notifications@github.com wrote:

Great! Thanks for letting me know, Howard.

Cheers, Tom

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/tomduck/pandoc-tablenos/issues/22#issuecomment-670807420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7UQGFE7FSZECJZEIF6MVDR7SWTRANCNFSM4PX6VG6A .