You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python
Python 3.7.0a2 (v3.7.0a2:f7ac4fe, Oct 17 2017, 17:06:29) [MSC v.1900 64 bit (AMD64)] on win32
$ python run.py
Ok let's go!
Traceback (most recent call last):
File "run.py", line 16, in
json_text = load_json_files(datasource_info, verbose=True)
File "D:\My Documents\Tech\NaiveBayse\Naive-Bayes-Evening-Workshop\datasource.py", line 12, in load_json_files
scraped_pages[name] = json.load(json_data)
File "C:\Users\abhseth.ORADEV\AppData\Local\Programs\Python\Python37\lib\json_init_.py", line 296, in load
return loads(fp.read(),
File "C:\Users\abhseth.ORADEV\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 4561288: character maps to
The text was updated successfully, but these errors were encountered:
I guess Windows uses backslash instead of forward slash. So try to replace the code at line number 11 of run.py with: datasource_info = [('newyorktimes', 'data\nyt_discussions.json'), ('motherjones', 'data\motherjones_discussions.json'), ('breitbart', 'data\breitbart_discussions.json')]
$ python
Python 3.7.0a2 (v3.7.0a2:f7ac4fe, Oct 17 2017, 17:06:29) [MSC v.1900 64 bit (AMD64)] on win32
$ python run.py
Ok let's go!
Traceback (most recent call last):
File "run.py", line 16, in
json_text = load_json_files(datasource_info, verbose=True)
File "D:\My Documents\Tech\NaiveBayse\Naive-Bayes-Evening-Workshop\datasource.py", line 12, in load_json_files
scraped_pages[name] = json.load(json_data)
File "C:\Users\abhseth.ORADEV\AppData\Local\Programs\Python\Python37\lib\json_init_.py", line 296, in load
return loads(fp.read(),
File "C:\Users\abhseth.ORADEV\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 4561288: character maps to
The text was updated successfully, but these errors were encountered: