Skip to content
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

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

Open
handyworkz opened this issue May 11, 2023 · 0 comments
Open

Comments

@handyworkz
Copy link

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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant