Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raises JSONDecodeError #4

Open
tbrodbeck opened this issue Nov 28, 2019 · 3 comments
Open

raises JSONDecodeError #4

tbrodbeck opened this issue Nov 28, 2019 · 3 comments

Comments

@tbrodbeck
Copy link

Hey! is this still working? 😬

Throws this error:

~/B/n/s/STT studDP -c                                                                          9:24
[INFO]: Logging initialized
[INFO]: Loading KWallet
[INFO]: Loading SecretService
[INFO]: Loading Windows
[INFO]: Loading chainer
[INFO]: Loading macOS
[INFO]: Loading Gnome
[INFO]: Loading Google
[INFO]: Loading Windows (alt)
[INFO]: Loading file
[INFO]: Loading keyczar
[INFO]: Loading multi
[INFO]: Loading pyfs
[INFO]: Listing Courses...
Traceback (most recent call last):
  File "/usr/local/bin/studDP", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/studdp/studdp.py", line 82, in main
    courses = client.get_courses()
  File "/usr/local/lib/python3.7/site-packages/studdp/model.py", line 226, in get_courses
    courses = json.loads(self._get('/api/courses').text)["courses"]
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@shoeffner
Copy link
Member

I just checked the website, it could actually be that they don't have the rest plugin anymore – or they switched to an app-token-based authentication. At least I didn't find the settings for it anymore. Do you mind checking that? Also, what happens when you try the courses endpoint directly: https://studip.uos.de/plugins.php/restipplugin/api/courses ? For me it says I wouldn't have access anymore.

@tbrodbeck
Copy link
Author

Oh okay, I have never used that tool before. I do not have access to the link anymore. Then probably it is an problem from studip. I might ask Tobias Thelen next time I see him.

@mschuwalow
Copy link
Collaborator

Sorry for being quiet here.
My understanding is that the plugin was deprecated a while ago and is no longer supported https://github.com/studip/studip-rest.ip.

Stud.ip should now expose another api https://docs.studip.de/develop/Entwickler/RESTAPI#toc4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants