I have multiple printers configured on my Octopi using octoprint_deploy script. Everything works fine except for the PrettyGCode viewer.
env.os.id: linux
env.os.platform: linux
env.python.pip: 22.3
env.python.version: 3.9.2
octoprint.version: 1.9.3
When I access the plugin from the Octoprint UI, nothing happens. When I click on the "Direct link to fullscreen mode" option, I get the following page:
I'm assuming the reason it's not working is perhaps because the location of gcode files changed in a later version of Octoprint to the uploads directory.
This makes no sense to me because it's mimicking the download button from the file list to load the raw data of the gcode file into js memory. That button does still link to downloads/....
The download button on the file list sends the file to your client. There is no downloads directory in the basedir for the server instance on Octoprint.
drwxr-xr-x 14 pi pi 4096 Nov 25 21:05 ./
drwxr-xr-x 17 pi pi 4096 Nov 26 21:03 ../
-rw------- 1 pi pi 2117 Nov 25 21:05 config.backup
-rw------- 1 pi pi 1786 Oct 23 15:50 config.system_command_migration.yaml
-rw------- 1 pi pi 2117 Nov 25 21:05 config.yaml
drwxr-xr-x 8 pi pi 4096 Nov 26 22:56 data/
drwxr-xr-x 3 pi pi 4096 Nov 25 21:05 generated/
drwxr-xr-x 2 pi pi 4096 Nov 26 22:56 logs/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 plugins/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 printerProfiles/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 scripts/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 slicingProfiles/
drwxr-xr-x 3 pi pi 4096 Nov 25 21:05 timelapse/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 translations/
drwxr-xr-x 2 pi pi 4096 Nov 26 23:27 uploads/
-rw------- 1 pi pi 249 Oct 14 12:56 users.yaml
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 virtualSd/
drwxr-xr-x 2 pi pi 4096 Nov 25 21:05 watched/
The uploads directory is where Octoprint stores your files for printing. That's where the plugin should expect to find the file currently being printed to visualize the gcode.
It started working only when I made the change to point to the correct directory.