wshuyi / markdown2slides

Tools for converting Markdown Source File to Reveal.js HTML5 slides
97 stars 20 forks source link

sorry, in my win10 64 laptop find some problem #1

Open Ernest861 opened 5 years ago

Ernest861 commented 5 years ago

image (base) D:\fMRITools\CA\markdown2slides>python md2slide.py example/myslide.md Traceback (most recent call last): File "md2slide.py", line 16, in converter = MarkdownRevealjsConverter(md_fname, *config) File "D:\fMRITools\CA\markdown2slides\revealjs_converter.py", line 11, in init super().init(args, **kwargs) File "D:\fMRITools\CA\markdown2slides\converter.py", line 24, in init self.config = json.load(f) File "C:\Users\zhdivel\Anaconda3\lib\json__init__.py", line 293, in load return loads(fp.read(), UnicodeDecodeError: 'gbk' codec can't decode byte 0x89 in position 113: illegal multibyte sequence

zi-NaN commented 5 years ago

It seems that the Python version you donwload is 2.* and there is no Python 3 in your computer. Maybe you can donwload Python3 and try it again.

Ernest861 commented 5 years ago

image thanks for your advice. when I call python, the python vision is 3.7

wshuyi commented 5 years ago

In this case, just use "python" instead of "python 3" and see if that works.

zi-NaN commented 5 years ago

In this case, just use "python" instead of "python 3" and see if that works.

He has tried with python command (in the first picture) and it throws a decode exception.

Wangliumeng commented 5 years ago

I have same problem...

zi-NaN commented 5 years ago

Can you go to the line 23 of conventer.py and pass encoding parameter to the open function? Something like this, with open(config_json_fname, encoding='latin1') as f:. You can try other encoding types, for example, utf8. I am not sure which kind of encoding types can solve the problem but it seems that it is an encoding problem.