Octoprint API and loglevels help

What is the problem?

My requests to the Octoprint API seem to be going through successfully, but don't seem to be actually doing anything on the printer, either the VIRTUAL printer or my real Prusa i3MK3S printer.

I have tested this out with two API requests: connecting to the printer, and selecting a file to print from the storage system. I can see the requests in the tornado.logs coming in, and both having a 200 response (I even tried with a filename that did not exist and got a correct 404 response).

When I send the same requests with a cURL command using the same API token and headers, they work correctly and I can see my printer (either the real one or the VIRTUAL printer) as connected in the Octoprint web app. These requests made using cURL also show up in the octoprint.log file, while my other API requests from my program only show up in tornado.log.

I attempted to turn on more logging for tornado.log, but always get an error when trying to save it as INFO level in the octoprint.log file:

AttributeError: 'PlaceHolder' object has no attribute 'setLevel'

When coming back to the logs settings in the web application, it is reset to default and did not save my changes and I do not get any more logging out of the system.

I'm wondering if there is a reason my cURL requests seem to work fine, and even though I can see that my other API requests coming from a program I wrote can make it to the tornado.log file as a success, that they do not seem to have an effect on the printer at all. I do not seem to be able to enable more logging to look further into the issue as well.

What did you already try to solve it?

  1. Restart and run in safe mode
  2. Look in octoprint.log and tornado.log to verify that the API requests are making it to the Octoprint server (they are)
  3. Try with cURL requests using the same API token as the API requests I am sending, I can see these in the octoprint.log and the printer will respond to the cURL requests correctly
  4. Try to enable more logging for tornado.log file, this resulted in the error mentioned above
  5. Verify that the API requests are using the same API token

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

Attached bundle here
octoprint-systeminfo-20230911004426.zip (403.4 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Octoprint version 1.9.2
Printer: Testing on the VIRTUAL printer from the virtual printer plugin, also the Prusa i3MK3s
Browser: Chrome
Operating system: MAC M1

This is a known bug that will be fixed in version 1.10.0, per issue 4753.

At least the logging issue, not necessarily the API issue...

Ah interesting, ok thanks for the info!

Still not sure about the API issue but will give it another shot when 1.10 comes out

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.