Closed SinisterRj closed 1 year ago
Hit up http://<printer>:7125/printer/objects/query?configfile
to get a better picture of what is causing this. Most likely it's something to do with your [authorization]
setup in Moonraker.
This is the result:
{"error": {"code": 401, "message": "Unauthorized", "traceback": "Traceback (most recent call last):\n\n File \"/home/pi/moonraker-env/lib/python3.7/site-packages/tornado/web.py\", line 1690, in _execute\n result = self.prepare()\n\n File \"/home/pi/moonraker/moonraker/app.py\", line 481, in prepare\n self.current_user = auth.check_authorized(self.request)\n\n File \"/home/pi/moonraker/moonraker/components/authorization.py\", line 751, in check_authorized\n raise HTTPError(401, \"Unauthorized\")\n\ntornado.web.HTTPError: HTTP 401: Unauthorized (Unauthorized)\n"}}
I'm using Octopi, but I have moonraker installed and working (even if it isn't necessary for Octoprint).
Yeah that 401 Unauthorized means you've setup the [authorization]
component in Moonraker, which is what this script uses to talk to your printer.
It doesn't look like this project supports using JWT/API keys to authenticate, so you need to disable force_logins
in moonraker.conf
, restart Moonraker, and assuming you're running this from your printer you are likely good to go.
Some references to help you: https://moonraker.readthedocs.io/en/latest/configuration/#authorization https://moonraker.readthedocs.io/en/latest/web_api/#authorization
@djessup thanks for the help
closing
I followed the instructions, but when I try to run the test I receive this error:
Warning: configfile.config is not configured Traceback (most recent call last): File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 599, in <module> main(args) File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 40, in main CFG.update(query_printer_objects("configfile", "config")) TypeError: 'NoneType' object is not iterable
I'm running in a OctoPi machine