Unexpected token '??=' when downloading pages #18

Closed
opened 2023-09-22 02:43:06 -06:00 by Patronics · 5 comments
Patronics commented 2023-09-22 02:43:06 -06:00 (Migrated from github.com)

It successfully builds the folder hierarchy, but fails to download any pages due to the errors of the form:

Downloading course home page
Unexpected token '??='
  Downloading assignment pages
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
  Downloading course module pages
  Downloading course announcements pages
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
Unexpected token '??='
  Downloading course discussion pages
Unexpected token '??='
Unexpected token '??=

and so on. It seems to correctly populate the json files, but not download any HTML pages.

Probably unrelated, but some other pages also report the error

Failed to retrieve submissions for this assignment
Forbidden

, but since that is less frequent it seems more likely to be an issue with canvas rather than the exporter.

It successfully builds the folder hierarchy, but fails to download any pages due to the errors of the form: ``` Downloading course home page Unexpected token '??=' Downloading assignment pages Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Downloading course module pages Downloading course announcements pages Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Unexpected token '??=' Downloading course discussion pages Unexpected token '??=' Unexpected token '??= ``` and so on. It seems to correctly populate the json files, but not download any HTML pages. Probably unrelated, but some other pages also report the error ``` Failed to retrieve submissions for this assignment Forbidden ``` , but since that is less frequent it seems more likely to be an issue with canvas rather than the exporter.
Patronics commented 2023-09-22 02:46:53 -06:00 (Migrated from github.com)

Also in case it's relevant, I'm running in a fresh python 3.11 venv, on MacOS 13.6. I'm happy to provide any additional info or debugging work as needed.

Also in case it's relevant, I'm running in a fresh python 3.11 venv, on MacOS 13.6. I'm happy to provide any additional info or debugging work as needed.
davekats commented 2023-09-26 11:07:45 -06:00 (Migrated from github.com)

@dj346 Are you able to help debug this issue?

@dj346 Are you able to help debug this issue?
davekats commented 2023-10-04 16:06:59 -06:00 (Migrated from github.com)

@Patronics I no longer have access to Canvas so it will be challenging for me to debug this issue. If you'd like you can schedule a call with me and we can debug the issue from your computer: https://usemotion.com/meet/davidk/hxmsj33

@Patronics I no longer have access to Canvas so it will be challenging for me to debug this issue. If you'd like you can schedule a call with me and we can debug the issue from your computer: https://usemotion.com/meet/davidk/hxmsj33
dj346 commented 2023-10-04 18:04:42 -06:00 (Migrated from github.com)

@Patronics what tool are you using to export your cookies and did you set a browser path in the singlefile.py?

@Patronics what tool are you using to export your cookies and did you set a browser path in the singlefile.py?
Patronics commented 2023-10-06 09:01:08 -06:00 (Migrated from github.com)

@Patronics what tool are you using to export your cookies and did you set a browser path in the singlefile.py?

Sorry for the late reply, I think I've resolved the issue, it seemed to be caused by me running an older version of node, (14.x instead of 16.x), updating that and rerunning npm i(along with setting the browser path) resolved the error message. I don't currently have a consistent internet connection to fully verify it works, but hopefully I will later today.

> @Patronics what tool are you using to export your cookies and did you set a browser path in the singlefile.py? Sorry for the late reply, I think I've resolved the issue, it seemed to be caused by me running an older version of node, (14.x instead of 16.x), updating that and rerunning `npm i`(along with setting the browser path) resolved the error message. I don't currently have a consistent internet connection to fully verify it works, but hopefully I will later today.
Sign in to join this conversation.
No description provided.