Git Product home page Git Product logo

Comments (8)

N-Coder avatar N-Coder commented on August 19, 2024

Unfortunately, I released version 3.0 once all the actual code was there, but didn't check the documentation and install scripts.

The package structure was changed in transition to version 3.0, without correctly taking care of the packaging process, so pip (and setuptools) are currently unable to install version 3.0 correctly in production mode. If you really want the stable version, use the --editable flag with pip or alternatively develop instead of install with an already checked-out setup.py.

The 'dev' branch also already has an updated README.md (plus some minor fixes, including a fix to this issue in 1c6995b), that doesn't list the dependency on the outdated studip-api package (which is no longer required thanks to the official Stud.IP REST API. The studip-api repo is now deprecated and archived.).
I still want to fix some small ToDos before releasing 3.1, but there should be no breaking changes on dev until then.

tl;dr Install from the dev branch until version 3.1 is released by using:
pip3 install git+https://github.com/N-Coder/studip-fuse@dev

from studip-fuse.

leon1995 avatar leon1995 commented on August 19, 2024

I’ve just got the same error, when following the README how to install studip-fuse. Then I followed your instruction and installed the dev branch. Then I got

$ studip-fuse -h
Traceback (most recent call last):
  File "./studip-fuse", line 7, in <module>
    from studip_fuse.launcher.main import main
  File "/home/username/.local/lib/python3.6/site-packages/studip_fuse/launcher/main.py", line 5, in <module>
    import studip_fuse.launcher.aioimpl.asyncio as aioimpl_asyncio
  File "/home/username/.local/lib/python3.6/site-packages/studip_fuse/launcher/aioimpl/asyncio/__init__.py", line 1, in <module>
    from studip_fuse.launcher.aioimpl.asyncio.aiohttp_client import AiohttpClient as HTTPClient, AiohttpDownload as Download, AuthenticatedClientRequest
  File "/home/username/.local/lib/python3.6/site-packages/studip_fuse/launcher/aioimpl/asyncio/aiohttp_client.py", line 9, in <module>
    from contextlib import AsyncExitStack
ImportError: cannot import name 'AsyncExitStack'

I’m using Ubuntu 18.04 and python 3.6

Hope you can help me :)

from studip-fuse.

n-st avatar n-st commented on August 19, 2024

Looks like that's a new feature of Python 3.7: https://docs.python.org/3/whatsnew/3.7.html#contextlib
Afaik @N-Coder uses Fedora (which ships Python 3.7), so no-one noticed the incompatibility…

@leon1995 Out of curiousity, how come a TUHH student is using a Passau-specific StudIP wrapper? 😄

from studip-fuse.

N-Coder avatar N-Coder commented on August 19, 2024

Try reinstalling the dev Version at the latest commit 9a9e496, which should fix the compatibility issue. Unfortunately, there is no single backport in contextlib2 for async functions yet, so I'm now using python-trio/async_generator and sorcio/async_exit_stack.

Automated testing with different Python Versions and OSes is what keeps me from finally releasing version 3.1 of Stud.IP-Fuse, so keep us posted on any further problems. 😉

@leon1995 Out of curiousity, how come a TUHH student is using a Passau-specific StudIP wrapper?

Well, it's not that specific to Passau. Except for the scripted Shibboleth login, everything should be compatible with any sufficiently recent Stud.IP version. Speaking of login: could you PM me some details on how the login procedure (just the procedure - no credentials 😛) works for your university and whether anything breaks? I'd be glad to help with ensuring compatibility with further Stud.IP instances.

from studip-fuse.

leon1995 avatar leon1995 commented on August 19, 2024

Thx for the quick answer. I reinstalled using
$ pip3 install git+https://github.com/N-Coder/studip-fuse@dev --user --upgrade
But now I get the old error again:

$ studip-fuse -h
Traceback (most recent call last):
  File "./studip-fuse", line 7, in <module>
    from studip_fuse.launcher.main import main
  File "/home/leon/.local/lib/python3.6/site-packages/studip_fuse/launcher/main.py", line 5, in <module>
    import studip_fuse.launcher.aioimpl.asyncio as aioimpl_asyncio
  File "/home/leon/.local/lib/python3.6/site-packages/studip_fuse/launcher/aioimpl/asyncio/__init__.py", line 2, in <module>
    from studip_fuse.launcher.aioimpl.asyncio.main_loop import setup_asyncio_loop as setup_loop
  File "/home/leon/.local/lib/python3.6/site-packages/studip_fuse/launcher/aioimpl/asyncio/main_loop.py", line 13, in <module>
    import studip_fuse.launcher.aioimpl.asyncio as aioimpl_asyncio
AttributeError: module 'studip_fuse.launcher.aioimpl' has no attribute 'asyncio'

@n-st I’m trying to find different ways to interact with stud-ip, because the mobile website is very very bad. I know there is an api for stud-ip but it has to be enabled by the system administrator and I don’t if my very very good technical university is willing to enable it. There is an official app at the App Store but it only supports few universities.

@N-Coder Ofc I want to help. Can you give me a hint what do you mean with login procedure? I’m not sure what do you mean. EDIT: I didn’t even know that there are different login procedures for different universities using stud-ip

from studip-fuse.

N-Coder avatar N-Coder commented on August 19, 2024

Your login seems to be the built-in one, so it should work with --login-method basic. Using this method (i.e. HTTP basic auth), you should also be able to access the regular API. Instead of HTTP basic auth, an existing session where you are logged in should also be sufficient, so could just try accessing this page in your browser and send me the response via mail? (using the address from here)

I'm currently setting up a VM to investigate your problem.

from studip-fuse.

N-Coder avatar N-Coder commented on August 19, 2024

Would you try again using 1239f3e?

Note to self: Ubuntu 16.04 is no longer supported, because it only ships python 3.5.2, but aiohttp requires >= 3.5.3. Ubuntu 18.04 and Python 3.6.7 have been successfully tested.

from studip-fuse.

leon1995 avatar leon1995 commented on August 19, 2024

It works. But when im trying to
$ studip-fuse MYUSERNAME ./studip/ --pwfile=- --foreground --login-method=basic
and i enter the password the authentication failes

EDIT: I guess because it tries on studip.uni-passau.de

EDIT2: using --studip-url="https://e-learning.tuhh.de/studip/api.php/" returns 403, Route not activated

from studip-fuse.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.