Something went wrong during startup Uncaught exception and configure_timelapse TypeError: 'NoneType' object is not subscriptable

What is the problem?

OctoPrint exits after trying to start up.

What did you already try to solve it?

I tried to redo the Optional: Webcam steps in Setting up OctoPrint on a Raspberry Pi running Raspbian or Raspberry Pi OS that I did before it stopped working.

Have you tried running in safe mode?

Yes. It would restart in Safe mode because it had a problem in the last attempt to start. I also manually used the --safe flag to start.

Did running in safe mode solve the problem?

No. It still exits.

Systeminfo Bundle

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

octoprint-systeminfo-20220203150323.zip (12.8 KB)

Additional information about your setup

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

OctoPrint v1.7.3

RaspberryPi Model B Rev2
Raspbian GNU/Linux 11 (bullseye)

Creality Ender-3
Marlin v1.0.1 2020-04-25

MacBook Pro (15-inch, 2018)
Mac OS 10.15.7
Chrome Version 97.0.4692.99 (Official Build) (x86_64)

Basically, I had OctoPrint running fine on my Pi and decided to set up a Logitech C270 webcam on it so proceeded to follow the steps for the Optional: Webcam setup.

I successfully downloaded and compiled MJPG-Streamer.
I was able to start the webcam server.
And, I cold see the 5fps stream pointing my browser to 'http://octopi.local:8080/?action=stream'.

I also followed the steps for Autostarting the webcam including editing config.yaml.
Everything seemed fine... until it wasn't.

*Other things I did that may or may not have caused this error:
1: electrical tape over the 5v pin on my USB-A cable going from the pi to the ender3,
2: attached a usb hub to the pi to connect both the webcam and printer (the usb wifi dongle was in the other usb port)

Reading through all the comments on that step by step I ran into this update: Setting up OctoPrint on a Raspberry Pi running Raspbian or Raspberry Pi OS - #122 by user8374585 I'm wondering if the instructions I followed were updated? ::shrug:: still working on it... and no, this did nothing.

Well, the webcam feed works fine. It's just OctoPrint that exits.

Trying to read the Traceback. TypeError in timelapse.py line 405 which says that timelapse is enabled but essential settings aren't set.

type = config["type"]
    if not timelapse_precondition and timelapse_precondition:
        logging.getLogger(__name__).warning(
            "Essential timelapse settings unconfigured (snapshot URL or FFMPEG path) "
            "but timelapse enabled."

Alright. I must have horked the config.yaml as I noticed some missing lines at the top of the file, so I restored from the config.backup and added the webcam lines back in.

system:
  actions:
   - action: streamon
     command: sudo systemctl start webcamd
     confirm: false
     name: Start video stream
   - action: streamoff
     command: sudo systemctl stop webcamd
     confirm: false
     name: Stop video stream

I seem to be back in business. I learned how to read Tracebacks and I really need to stop fat fingering in vi.

1 Like

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