AmEv7Fam/familysearch-python-sdk-opensource

Imports are broken

Closed this issue · 5 comments

Just got latest. Looks like imports aren't working anymore.

Simple example:
from familysearch import FamilySearch
fs = FamilySearch('bar', 'foo', base="https://sandbox.familysearch.org")
fs.login(input("Username: "), getpass())

Running this gives:
AttributeError: 'FamilySearch' object has no attribute 'login'

+1
I tried changing around ordering of the "from . import" statements in init.py, and some other ways to make sure the FamilySearch class correctly imports the methods from the Authentication class, but no luck. I'm not exactly sure why the package is organized like this.

I think I may know what may have caused that....

It may have been the moving of the
from familysearch import FamilySearch FamilySearch.__bases__ += (ModuleName,)
into the class's __init__ function.

It was originally at the bottom.
I moved it due to other import errors.

As for the orginization, I modeled it (or at least tried to model it) after the FamilySearch API documentation.

...I know exactly what I did wrong...

Let me fix it.

Hmmm, the newest commit (a4b99ec) is still giving me issues. All of the other class methods are present in an instantiated FamilySearch object, except for those from authentication_.py.

Sorry about that! I honestly thought I got it.