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

"Service not applicable/Does not exist" when copying from another Classroom #419

Open
gns-jdaniel opened this issue Jun 19, 2024 · 2 comments

Comments

@gns-jdaniel
Copy link

gns-jdaniel commented Jun 19, 2024

Using the following GAM command:
gam create course name "Chemistry 11 2024-25" teacher jdoe@school.edu copyfrom 619000000000 materialstates all markpublishedasdraft true workstates all markpublishedasdraft true removeduedate true copymaterialsfiles true copytopics true members teachers mapsharemodestudentcopy view logdrivefileids true

The new classroom is created, but the course materials are not copied:
Getting all Course Work IDs that match query (Course Work State: PUBLISHED) for Course: 619000000000
Got 30 Course Work IDs that matched query (Course Work State: PUBLISHED) for Course: 619000000000...
Getting all Course Topics for Course: 619000000000
Got 9 Course Topics for Course: 619000000000...
Course Name: Chemistry 11 2024-25, Course: 619111111111, Created
Course: 619111111111, Copy from Course: 619000000000
User: jdoe@school.edu, Service not applicable/Does not exist
courseId,ownerId,fileId
619000000000,108000111222333444555,13xxxxxxxxxxxxxxxxxxxxxxxxxxxx_4x
619000000000,108000111222333444555,1IDsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-iRI
619000000000,108000111222333444555,1m4exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIIoM
619000000000,108000111222333444555,15OLxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0A8o
619000000000,108000111222333444555,1Mxxxxxxxxxxxxxxxxxxxxxxxxxxxx9fZ
619000000000,108000111222333444555,19HAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixKA
619000000000,108000111222333444555,1qxxxxxxxxxxxxxxxxxxxxxxxxxxxx0lU
619000000000,108000111222333444555,1z5SxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxpIUs
619000000000,108000111222333444555,1Txxxxxxxxxxxxxxxxxxxxxxxxxxxxtnz
619000000000,108000111222333444555,1nxxxxxxxxxxxxxxxxxxxxxxxxxxxxAfV
619000000000,108000111222333444555,1Kxxxxxxxxxxxxxxxxxxxxxxxxxxxx8vR
619000000000,108000111222333444555,1rA4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIE0k
619000000000,108000111222333444555,1muwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxfmdo
619000000000,108000111222333444555,1j_IxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxJ5Qs
619000000000,108000111222333444555,1vdfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxVs9I
619000000000,108000111222333444555,1OuSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQuvA

I see that it found 30 Course Work IDs, but only 16 file IDs are returned. I tried turning on debug_level = 1, but while there was a lot of detail, it didn't seem to show any more reasons for why it wasn't happy.

This issue looks to be the same, and I saw this note in the changelog that sounds like it might be related, but I'm using GAMADV-XTD3 6.76.15...

Any idea how I can find out what's causing this error? I'm guessing it's related to a document that jdoe@school.edu doesn't own (or something similar), but it would be awesome to be able to skip documents that cause problems, and still retain everything else rather than creating the course but copying nothing.

@gns-jdaniel
Copy link
Author

Hmmmm... on further review, I see 401 error plus a 1990 expiry date in the header...not sure if this is relevant:
connect: (oauth2.googleapis.com, 443)
send: b'POST /token HTTP/1.1\r\nHost: oauth2.googleapis.com\r\nContent-Length: 1325\r\ncontent-type: application/x-www-form-urlencoded\r\nx-goog-api-client: gl-python/3.12.3 auth/2.30.0 auth-request-type/at cred-type/sa\r\nuser-agent: GAMADV-XTD3 6.76.15 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.3 final / macOS-14.5-arm64-arm-64bit arm64 /\r\naccept-encoding: gzip, deflate\r\n\r\n'
send: b'assertion=[SNIPPED]&grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Date: Wed, 19 Jun 2024 20:08:27 GMT
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Content-Type: application/json; charset=utf-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Server: scaffolding on HTTPServer2
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked
User: jdoe@school.edu, Service not applicable/Does not exist
courseId,ownerId,fileId

@taers232c
Copy link
Owner

taers232c commented Jun 19, 2024 via email

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

2 participants