Skip to content

TypeError: startswith first arg must be str or a tuple of str, not bytes #365

@handyworkz

Description

@handyworkz

Traceback (most recent call last):
File "c:\Users\ADWIN\Documents\GitHub\Udacity ML\ud120-projects\datasets_questions\explore_enron_data.py", line 20, in
enron_data = joblib.load(open("C:/Users/ADWIN/Documents/GitHub/Udacity ML/ud120-projects/final_project/final_project_dataset.pkl", "r"))
File "C:\Users\ADWIN\anaconda3\envs\PyML3\lib\site-packages\joblib\numpy_pickle.py", line 647, in load
with _read_fileobject(fobj, filename, mmap_mode) as fobj:
File "C:\Users\ADWIN\anaconda3\envs\PyML3\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\ADWIN\anaconda3\envs\PyML3\lib\site-packages\joblib\numpy_pickle_utils.py", line 149, in _read_fileobject
compressor = _detect_compressor(fileobj)
File "C:\Users\ADWIN\anaconda3\envs\PyML3\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

Whenever I run the explore_enron_data.py file I get this error and I dont know why
This is the code:

import joblib

enron_data = joblib.load(open("C:/Users/ADWIN/Documents/GitHub/Udacity ML/ud120-projects/final_project/final_project_dataset.pkl", "r"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions