mplewis / csvtomd

📝📊 Convert your CSV files into Markdown tables.
MIT License
655 stars 90 forks source link

Issue when calling csvtomd function #17

Closed xiapoy closed 7 years ago

xiapoy commented 7 years ago

I just installed csvtomd and have the following issue when trying to call the function csvtomd doc.csv > doc.md.

Traceback (most recent call last):
  File "/opt/conda/envs/python2/bin/csvtomd", line 11, in <module>
    load_entry_point('csvtomd==0.2.1', 'console_scripts', 'csvtomd')()
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/csvtomd/__init__.py", line 1, in <module>
    from .csvtomd import *
  File "/opt/conda/envs/python2/lib/python2.7/site-packages/csvtomd/csvtomd.py", line 79
    def md_table(table, *, padding=1, divider='|', header_div='-'):
                         ^
SyntaxError: invalid syntax
mplewis commented 7 years ago

Hey @naileakim, it looks like you are using Python 2. This script doesn't support Python 2.

You'll need to install this with Python 3 instead: pip3 install csvtomd.