powerapi / powerapi-python

Python API for PowerSchool
http://powerapi.henriwatson.com/
13 stars 5 forks source link

AttributeError: 'NoneType' object has no attribute 'groups' #2

Closed tpaulus closed 10 years ago

tpaulus commented 10 years ago

I can't login/authenticate into PowerSchool. I haven't changed the demo.py file too much, just the username, password and the url.

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/tpaulus/Repository/PowerGrades/demo.py Traceback (most recent call last): File "/Users/tpaulus/Repository/PowerGrades/demo.py", line 12, in user = ps.auth(username, password) File "/Users/tpaulus/Repository/PowerGrades/powerapi/core.py", line 42, in auth authdata = self._getAuthData() File "/Users/tpaulus/Repository/PowerGrades/powerapi/core.py", line 32, in _getAuthData data['contextData'] = contextData.groups()[0] AttributeError: 'NoneType' object has no attribute 'groups'

unlobito commented 10 years ago

Hey Tom,

Barring situations where someone is running into a breaking problem that's stopping them from working on something time sensitive, I'm holding off on making any changes to PowerAPI-python as I'm currently in the process of migrating everything over to pearson-rest.

pearson-rest uses a different authentication mechanism so this shouldn't be an issue.

If this is time sensitive, please drop me a note at henri@henriwatson.com with your PowerSchool server's URL and I'll take a closer look at this.

Cheers.

tpaulus commented 10 years ago

It's not urgent. Thanks for releasing your source code, it is very clean and well documented.

controversial commented 9 years ago

I have the same issue. How's the move going?

controversial commented 9 years ago

Also, will the new version support newer PowerSchool versions? My school (ps.newpaltz.k12.ny.us) is on the newest version.

unlobito commented 8 years ago

Hi Luke,

Unfortunately I was unable to get the SOAP version of PowerAPI-Python to work due to a lack of good SOAP libraries for Python. Since I've graduated, I also no longer have access to a PowerSchool instance and am no longer able to continue working on this project.

You might be able to use PowerAPI-PHP or PowerAPI-Ruby as both of these use the newer SOAP APIs.

controversial commented 8 years ago

Ok. I'm not familiar with Ruby and PHP the way I am with Python, but thanks for the reply. If you are interested in continuing development, even though you've graduated, I could possibly provide a login to my school's server as everything is read-only. You're probably not interested in the project anymore, however.

This is a list of SOAP libraries in Python that I found

busterroni commented 8 years ago

@The-Penultimate-Defenestrator I just ran the demo and I'm not running into this issue. I think it has to do with the way your PowerSchool is set up maybe. I'm planning on expanding this API -- let me know if you have any interest in working on it together.

controversial commented 8 years ago

I'd be interested in helping a bit. I don't have extensive knowledge of web servers and such, but I do have a broad knowledge of Python. I'd be interested to collaborate

busterroni commented 8 years ago

@henriwatson I just submitted a PR with a few new methods.

@The-Penultimate-Defenestrator Is the issue fixed for you? IIRC I had the same issue when I first started using this API but for some reason it's now fixed. Let me know.

controversial commented 8 years ago

I'll check

controversial commented 8 years ago

No, I still get 'NoneType' object has no attribute 'groups'