New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to run codespell.py on debian lenny with python 3.2.1 #2
Comments
Did you try giving the correct file name? Looking at how you ran it, you should do like below. $ ./codespell.py data/dictionary.txt data/dictionary.txt |
ahnn... and checking the dictionary against the dictionary is just a test, right? |
Yes, it is just a test. It also happens if i choose another file or directory. |
Do you have any idea, or hint why it does not working? |
Ok, i found i myself: At line 256 you have to insert the following line: def build_dict(filename): On my machine, the encoding was not set by default to utf-8. Can you add this to your next release? Many thanks for this great tools Best regards Ettl Martin |
Thanks very much... I applied the fix you suggested. Please, test if it's working now. |
Thanks for your quick help, it works fine. Best regards Martin 2011/12/6 Lucas De Marchi <
|
Ok, let's make a release with this fix: v1.3 is out |
$ python3 --version
Python 3.2.1
Here is the traceback:
$./codespell.py dictionary.txt dictionary.txt
Traceback (most recent call last):
File "./codespell.py", line 526, in
sys.exit(main(*sys.argv))
File "./codespell.py", line 473, in main
build_dict(args[0])
File "./codespell.py", line 264, in build_dict
for line in f:
File "/usr/local/lib/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3170: ordinal not in range(128)
What do you suggest?
Many thanks
Martin
The text was updated successfully, but these errors were encountered: