Skip to content

Getting Attribute Error while loading Word_Encoder in Python3 Ubuntu 16.04 #22

@rajeshkumargp

Description

@rajeshkumargp

While executing the below line

word_encoder = joblib.load(os.path.abspath(wencoder))
in chempred-example.py

Error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-c6df7829b65d> in <module>()
----> 1 word_encoder = joblib.load(os.path.abspath(wencoder))

~/.local/lib/python3.5/site-packages/joblib/numpy_pickle.py in load(filename, mmap_mode)
    576                     return load_compatibility(fobj)
    577 
--> 578                 obj = _unpickle(fobj, filename, mmap_mode)
    579 
    580     return obj

~/.local/lib/python3.5/site-packages/joblib/numpy_pickle.py in _unpickle(fobj, filename, mmap_mode)
    506     obj = None
    507     try:
--> 508         obj = unpickler.load()
    509         if unpickler.compat_mode:
    510             warnings.warn("The file '%s' has been generated with a "

/usr/lib/python3.5/pickle.py in load(self)
   1037                     raise EOFError
   1038                 assert isinstance(key, bytes_types)
-> 1039                 dispatch[key[0]](self)
   1040         except _Stop as stopinst:
   1041             return stopinst.value

/usr/lib/python3.5/pickle.py in load_global(self)
   1332         module = self.readline()[:-1].decode("utf-8")
   1333         name = self.readline()[:-1].decode("utf-8")
-> 1334         klass = self.find_class(module, name)
   1335         self.append(klass)
   1336     dispatch[GLOBAL[0]] = load_global

/usr/lib/python3.5/pickle.py in find_class(self, module, name)
   1386             return _getattribute(sys.modules[module], name)[0]
   1387         else:
-> 1388             return getattr(sys.modules[module], name)
   1389 
   1390     def load_reduce(self):

AttributeError: module 'sciner.preprocessing.parsing' has no attribute 'transform'

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