-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Error while loading data using joblib and import errors of the dependent fiels for models #376
Comments
@jaycode @13rac1 @nmb10 @richardkalehoff please try to fix the codebase in order to run the models of machine learning. |
Hi @Rupesh-Darimisetti, the code was set up to use Python 3.6.3. It looks like you are using 3.11, which rendered the unpickle feature to fail. I suggest creating a new virtual environment to run it. |
Even though i use python 3.6.8 version and reinstall the venv it's throwing the following error @jaycode python naive_bayes/nb_author_id.py
Traceback (most recent call last):
File "naive_bayes/nb_author_id.py", line 24, in <module>
features_train, features_test, labels_train, labels_test
= preprocess()
File ".\tools\email_preprocess.py", line 34, in preprocess
word_data = joblib.load(words_file_handler)
File "D:\02_learning\udacity\machine_learning\ud120-projec
ts\venv\lib\site-packages\joblib\numpy_pickle.py", line 577,
in load
obj = _unpickle(fobj)
File "D:\02_learning\udacity\machine_learning\ud120-projec
ts\venv\lib\site-packages\joblib\numpy_pickle.py", line 506,
in _unpickle
obj = unpickler.load()
File "C:\Users\rupes\AppData\Local\Programs\Python\Python3
6-32\lib\pickle.py", line 1050, in load
dispatch[key[0]](self)
File "C:\Users\rupes\AppData\Local\Programs\Python\Python3
6-32\lib\pickle.py", line 1174, in load_string
raise UnpicklingError("the STRING opcode argument must b
e quoted")
_pickle.UnpicklingError: the STRING opcode argument must be
quoted
(venv) |
I was also facing the same issue. But after a few stack overflow threads, I found the issue to be the Line separator format for both word_data.pkl and email_author.pkl was the one that brought about the errors. Changing it to LF from CRLF or CR might do the trick. |
The repository not unable to load the basic import files used in model from the tools path and even appending with
it resolves importing error of
after which it throwing error with joblib loading files as
The text was updated successfully, but these errors were encountered: