sandman icon indicating copy to clipboard operation
sandman copied to clipboard

NameError NameError: global name '__from_class__' is not defined

Open timothyjlaurent opened this issue 10 years ago • 3 comments

I am getting an error from the meta(cls) method in models.py

Will give a PR shortly

timothyjlaurent avatar Jun 23 '14 18:06 timothyjlaurent

So I will ghet up to speed with waffles.io and not really much of a Python tester (yet!) .

her are my code changes which fix the problem:

from:

  163         if __from_class__i:
  164             cls = self.__from_class__

to:

  163         try:
  164             __from_class__
  165         except NameError:
  166             print "__from_class__ not defined"
  167         else:
168             cls = self.__from_class__

timothyjlaurent avatar Jun 23 '14 18:06 timothyjlaurent

Looks like this is fixed in the current release not in the pip install version

timothyjlaurent avatar Jun 23 '14 20:06 timothyjlaurent

Can you please give the full traceback of the error you're seeing, as well as the output of sandmanctl --version?

jeffknupp avatar Jun 27 '14 17:06 jeffknupp