dbosk / canvaslms

Command-line interface to Canvas LMS
https://pypi.org/project/canvaslms/
MIT License
4 stars 2 forks source link

Login bug #79

Open dbosk opened 1 year ago

dbosk commented 1 year ago

On mån 29 maj 2023 13:25:23, Marcus Dicander wrote:

Hej.

Jag tänkte testa canvaslms lokalt på min jobbdator och möttes där av följande:

$ ls $ canvaslms login Traceback (most recent call last): File "/home/dicander/.local/bin/canvaslms", line 8, in sys.exit(main()) File "/home/dicander/.local/lib/python3.10/site-packages/canvaslms/cli/init.py", line 90, in main canvas = Canvas(hostname, token) File "/home/dicander/.local/lib/python3.10/site-packages/canvasapi/canvas.py", line 32, in init if "api/v1" in base_url: TypeError: argument of type 'NoneType' is not iterable $

Har du några förslag på vad jag kan testa istället?

dbosk commented 1 year ago

Probably related to #76

monperrus commented 1 year ago

I can login, with no error.

But then:

$ canvaslms courses
/home/martin/.local/bin/canvaslms: error: No hostname or token, run `canvaslms login`

as if the information put during canvas login are not saved

dbosk commented 1 year ago

Thanks @monperrus ! Found the bug, I had a typo in the code. See dc747f2a3163b074cd56ddca79327bfca28ae97f.

monperrus commented 1 year ago

Thanks Daniel. Do you have CD such that the pypy version is already up-to-date?

dbosk commented 1 year ago

Do you have CD such that the pypy version is already up-to-date?

I do it manually for now. I just run make publish to publish a new version on PyPI, build a new Docker image and push to Docker Hub, build the documented source and publish a new release on GH with the PDF attached.

But I would like to use GH Actions instead to get CD, but we'll see when I've had the time to look into it.

dbosk commented 1 year ago

such that the pypy version is already up-to-date?

But yes, it's already up-to-date!