pycco-docs / pycco

Literate-style documentation generator.
https://pycco-docs.github.io/pycco/
Other
842 stars 144 forks source link

UnicodeDecodeError: 'utf8' codec can't decode #99

Open braunman opened 7 years ago

braunman commented 7 years ago

Hi, Try to use pycco, but caught error:

Traceback (most recent call last):

C:\TEMP>pycco -d doc2 -p test pycco: test\Base.py -> doc2\test\Base.html Traceback (most recent call last): File "C:\Python27\Scripts\pycco-script.py", line 11, in load_entry_point('Pycco==0.5.1', 'console_scripts', 'pycco')() File "c:\python27\lib\site-packages\pycco\main.py", line 618, in main skip=opts.skip_bad_files) File "c:\python27\lib\site-packages\pycco\main.py", line 531, in process next_file() File "c:\python27\lib\site-packages\pycco\main.py", line 530, in next_file next_file() File "c:\python27\lib\site-packages\pycco\main.py", line 519, in next_file encoding=encoding)) File "c:\python27\lib\site-packages\pycco\main.py", line 51, in generate_documentation code = open(source, "rb").read().decode(encoding) File "c:\python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xf3 in position 1: invalid continuation byte

simahawk commented 6 years ago

not sure if this is related but I'm getting the same result and pdb tells me that it fails on a test cache dir:

'models/__pycache__/__init__.cpython-35.pyc'

The tool shoud definitely ignore such things :)