Coder Social home page Coder Social logo

Token error about moodle-dl HOT 9 CLOSED

c0d3d3v avatar c0d3d3v commented on August 31, 2024
Token error

from moodle-dl.

Comments (9)

shoeper avatar shoeper commented on August 31, 2024

The login token is invalid, you have to get and set a new one.

from moodle-dl.

marcoscale98 avatar marcoscale98 commented on August 31, 2024

how to do it? Maybe the system should do it automatically

from moodle-dl.

C0D3D3V avatar C0D3D3V commented on August 31, 2024

You can use python main.py --new-token to generate a new token (add the option --sso if you are using single sign on). The downloader can't do that automaticly because it does not store your credentials.

from moodle-dl.

C0D3D3V avatar C0D3D3V commented on August 31, 2024

Normaly multiple devices can use the same token. For example if you also use the moodle app it should not reject the token.
Normally a token is also almost never invalid.

But there are circumstances in which a token is discarded more quickly by Moodle. For example, if you make a lot of requests in quick succession. For example, if you run the downloader every 5 minutes (and you are enrolled in many courses). Such behavior can lead to the token being rejected quickly.

My token was not rejected by moodle although I have been running the downloader every 15 minutes for half a year. I think it also depends on how Moodle was set up.

from moodle-dl.

marcoscale98 avatar marcoscale98 commented on August 31, 2024

You can use python main.py --new-token to generate a new token (add the option --sso if you are using single sign on). The downloader can't do that automaticly because it does not store your credentials.

It doesn't ask me the password...
image

from moodle-dl.

C0D3D3V avatar C0D3D3V commented on August 31, 2024

you are using mingw so you have to run python with winpty.
try: winpty python main.py --new-token

from moodle-dl.

C0D3D3V avatar C0D3D3V commented on August 31, 2024

Alternatively you can also use the normal Windows Command Prompt (cmd) or the Power Shell.

from moodle-dl.

C0D3D3V avatar C0D3D3V commented on August 31, 2024

Can I close this issue?

from moodle-dl.

marcoscale98 avatar marcoscale98 commented on August 31, 2024

Can I close this issue?

Yeah, sorry. I resolved

from moodle-dl.

Related Issues (20)

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.