date-extractor icon indicating copy to clipboard operation
date-extractor copied to clipboard

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 125: character maps to <undefined>

Open varunkuntal opened this issue 3 years ago • 6 comments

Running python 3.7.6 in jupyter notebook, occurred when trying to import using "from date_extractor import extract_dates".

varunkuntal avatar Aug 26 '20 08:08 varunkuntal

Hi, @varunkuntal . I'm sorry for the late reply. Life stuff had got me busy, but should have some more availability in the coming weeks. Is this something that you would be interested in submitting a Pull Request? If not, I can take a look at it (but will probably be at least a week before fixing). Thank you!

DanielJDufour avatar Sep 13 '20 15:09 DanielJDufour

Hi @varunkuntal, I'm getting the same problem with the latest version, I tried the date_extractor==5.0.0 version, it's running now. , are u tried that?

santhu2210 avatar Oct 27 '20 10:10 santhu2210

Hi. I'm really sorry about this issue. Would you be able to share what code you used to get Jupyter running? Do you know what version of Jupyter? What type of operating system are you using? Windows, MacOS, Ubuntu, etc.? Thank you!

DanielJDufour avatar Oct 30 '20 00:10 DanielJDufour

@santhu2210 If you replace in the file "date_extractor\enumerations\ __ init_.py"_ line number 26 with "with open (join (datadir, f"months_verbose/{language}.txt"), encoding ="utf8") as f:" and line 91 with "with open (join(datadir, f"months_verbose/{language}.txt"), encoding = "utf8") as f:" you should be able to import everything without problems.

ricky1192 avatar Nov 26 '20 11:11 ricky1192

@ricky1192 , great fix! Would you like to submit a PR? Thank you!

DanielJDufour avatar Nov 26 '20 17:11 DanielJDufour

Thank you for the PR @ricky1192 . I merged it in and published a new version, so this problem should be fixed now. @varunkuntal and @santhu2210 , did this fix your issues?

DanielJDufour avatar Nov 27 '20 14:11 DanielJDufour