udacity / ud120-projects

Starter project code for students taking Udacity ud120
1.62k stars 5.66k forks source link

Facing issue in find_signature.py #346

Open hitish opened 2 years ago

hitish commented 2 years ago

As my project both files your_word_data.pkl and your_email_authors.pkl are created. but when i try to open these files in find_signature.py i am getting error : TypeError: startswith first arg must be str or a tuple of str, not bytes

ERROR : Traceback (most recent call last): File "C:\Users\Lenovo\github\ud120-projects\feature_selection\find_signature.py", line 13, in word_data = joblib.load( open(words_file, "r")) File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\joblib\numpy_pickle.py", line 576, in load with _read_fileobject(fobj, filename, mmap_mode) as fobj: File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter return next(self.gen) File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\joblib\numpy_pickle_utils.py", line 149, in _read_fileobject compressor = _detect_compressor(fileobj) File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\joblib\numpy_pickle_utils.py", line 100, in _detect_compressor if first_bytes.startswith(_ZFILE_PREFIX): TypeError: startswith first arg must be str or a tuple of str, not bytes