robcowie / SublimeTODO

**[DEPRECATED]** - See https://github.com/jonathandelgado/SublimeTodoReview - Extract TODO-type comments from open files and project folders
295 stars 54 forks source link

TODO extracting doesn't work #13

Closed pierregoudjo closed 12 years ago

pierregoudjo commented 12 years ago

When I want to show TODO results, blank page appears. The console tracback is:

Traceback (most recent call last):
   File "./todo.py", line 265, in render
   File "./todo.py", line 234, in render_to_view
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 104: ordinal not in range(128)
robcowie commented 12 years ago

What version are you using? Latest should be listed as v2012.01.21.17.16.06 (via the List Installed Packages command)

Early versions did not handle encoding issues like this. I reckon I've 'fixed' it. I can't always correctly decode the file contents as the plugin doesn't know what encoding is used in the file. It tries utf8, then the configured default encoding (ST2 setting) and fails silently if it still can't decode.

I'll take a look at the code anyway.

pierregoudjo commented 12 years ago

I am using v2012.01.21.17.16.06 version of the plugin.

robcowie commented 12 years ago

What is your default file encoding and fallback encoding (see File Settings - Default).

I'm having a hard time reproducing the problem. It would be great if you could isolate the file that is causing the problem and share it (or the part of it that is the issue).

pierregoudjo commented 12 years ago

My default file encoding is UTF-8, fallback encoding is "Western (Windows 1252)". I am working on Ubuntu Linux 11.10. Do you think that my problem come from my OS?

robcowie commented 12 years ago

Unlikely to be an OS issue. It is inevitably a bug of my making. Any luck isolating the offending file?

pierregoudjo commented 12 years ago

I have a look to the file (despite Python isn't my stuff) and your todo.py looks good. I can't locate the bug.

robcowie commented 12 years ago

Are you still having issues? Does the plugin run on any of your files?

pierregoudjo commented 12 years ago

Issues still persist. I ran the plugin on php, js, txt. Nothing

robcowie commented 12 years ago

@pierregoudjo Just merged a pull request from @kch42 that should fix your issue. Can you update and let me (us) know if the your issue persists. Thanks.

pierregoudjo commented 12 years ago

The plugin works now. Great! Thanks you!