-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Description
The repository not unable to load the basic import files used in model from the tools path and even appending with
sys.path.append(".")it resolves importing error of
fromtools.email_preprocess import preprocessafter which it throwing error with joblib loading files as
python naive_bayes/nb_author_id.py
Traceback (most recent call last):
File "D:\02_learning\udacity\machine_learning\ud120-projects\naive_bayes\nb_author_id.py", line 24, in <module>
features_train, features_test, labels_train, labels_test = preprocess()
^^^^^^^^^^^^
File "D:\02_learning\udacity\machine_learning\ud120-projects\tools\email_preprocess.py", line 31, in preprocess
word_data = joblib.load(open("tools/word_data.pkl","rb"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\02_learning\udacity\machine_learning\ud120-projects\venv\Lib\site-packages\joblib\numpy_pickle.py", line 648, in load
obj = _unpickle(fobj)
^^^^^^^^^^^^^^^
File "D:\02_learning\udacity\machine_learning\ud120-projects\venv\Lib\site-packages\joblib\numpy_pickle.py", line 577, in _unpickle
obj = unpickler.load()
^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\pickle.py", line 1213, in load
dispatch[key[0]](self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\pickle.py", line 1337, in load_string
raise UnpicklingError("the STRING opcode argument must be quoted")
_pickle.UnpicklingError: the STRING opcode argument must be quotedMetadata
Metadata
Assignees
Labels
No labels