github OctoPrint/OctoPrint 1.4.1
1.4.1 (stable release)

latest releases: 1.10.0, 1.10.0rc4, 1.10.0rc3...
3 years ago

Heads-up for users of the Telegram plugin v1.5.0 or lower (and possibly other plugins that use long deprecated flask.ext imports)

The Telegram plugin up until the currently latest version 1.5.0 from August 7th 2019 is incompatible to OctoPrint 1.4.1 and later (see this ticket). The reason for that is that OctoPrint had to update its third party Flask dependency for security reasons, and this plugin (and possibly others) still use an import syntax related to that dependency that has been deprecated and warned about for several years now and which finally has been removed in current versions of Flask.

A fix has been provided to the Telegram plugin maintainers and has been merged, but so far no new release has been pushed out.

If you notice the Telegram plugin or another third party plugin no longer loading under OctoPrint 1.4.1 with an error logged to octoprint.log that looks similar to

  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 972, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 71, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_telegram/__init__.py", line 5, in <module>
    from flask.ext.babel import gettext
ImportError: No module named ext.babel

then this outdated import syntax is the reason. That is something that needs to be fixed by the plugin maintainers by pushing out a new release. Please do not open issues about this on the OctoPrint repository, I cannot do anything about this.

Heads-up for users of the TouchUI plugin v0.3.14 or lower

The TouchUI plugin up until the currently latest version 0.3.14 from March 11 2020 is incompatible to OctoPrint as it makes assumptions about the structure of the UI that are no longer true, leading to the plugin breaking the OctoPrint UI when active.

A fix is ready but no release has been pushed out yet. Until a fixed version is released it is suggested to disable the plugin under 1.4.1.

See also the ticket here.

Heads-up for plugin authors: Jinja2 update has one backwards incompatibility, please read

Current Jinja versions no longer allow modifying variables set outside of for loops inside them. So something like:

{% set mark_active = True %}
{% for item in items %}
    # do something
    {% if mark_active %}
        # do something more
        {% set mark_active = False %}
    {% endif %}
{% endfor %}

no longer works - mark_active will be reset on every iteration of the loop to its initial value False. The fix is to use namespaces to hold the modifiable values instead:

{% set ns = namespace(mark_active = True) %}
{% for item in items %}
    # do something
    {% if ns.mark_active %}
        # do something more
        {% set ns.mark_active = False %}
    {% endif %}
{% endfor %}

See also #1697 and https://jinja.palletsprojects.com/en/2.11.x/templates/#assignments

The Jinja dependency upgrade thus introduces a breaking change for plugins as well. However, it was necessary for security reasons: older versions have a bug that could allow template authors to break out of the template sandbox. Not a huge risk in the context of OctoPrint (plugins already have a lot more power than Jinja would give them), but still overdue to fix.

Heads-up for plugin authors: awesome-slugify is now bundled as octoprint.vendor.awesome_slugify, update your imports!

Due to a necessary dependency update of a third party dependency pulling in a different slugify library ("python-slugify") that clashes with awesome-slugify, the latter has been bundled. If you use import slugify anywhere in your code, please be aware that that will now possibly pull in the aforementioned other library or possibly a partially overwritten awesome-slugify. Plugin authors are advised to update the imports of awesome-slugify like this:

### old

# example 1
import slugify

# example 2
from slugify import Slugify

### new

# example 1
try:
  # OctoPrint>=1.4.1
  import octoprint.vendor.awesome_slugify as slugify 
except ImportError:
  # OctoPrint<=1.4.0
  import slugify

# example 2
try:
  # OctoPrint>=1.4.1
  from octoprint.vendor.awesome_slugify import Slugify
except ImportError:
  # OctoPrint<=1.4.0
  from slugify import Slugify

That will also guarantee backwards compatibility if installed under OctoPrint versions prior to 1.4.1. Alternatively switch fully to the 1.4.1 version and adjust your plugin listing to a minimum OctoPrint version of 1.4.1.

Heads-up for developers: The included virtual printer has had its settings migrated to a different location in config.yaml

The bundled Virtual Printer plugin has finally been turned fully isolated into a self contained plugin and thus its settings have been moved from devel.virtualPrinter to plugins.virtual_printer in config.yaml. An auto migration is in place that should take care of moving anything already configured on first start under 1.4.1+, however should you be somehow manipulating config.yaml through automation or something in order to change virtual printer settings, you'll have to update your workflows.

Improvements

  • #216 - New control on Temperature tab to set all heaters to temperatures from a configured temperature profile with one click (see also #3617)
  • #2312 - Software Update: Refuse to update if there is insufficient disk scape to do so. Disk space threshold is configurable and defaults to at least 150MB of free space in the Python package installation folder, the internal plugin folder and the system's temporary files folder. This value might be revisited and increased if it proves to be too small still.
  • #2451 - Add support for sub folders on the watched folder (see also #3557)
  • #3344 - Don't invalidate server side cache on hard reload while printing. Should combat performance issues on low powered systems.
  • #3410 - Add bundled "File Check" plugin to sanity check uploaded files and warn about potential issues. Currently the plugin only detects {travel_speed} place holders left in GCODE. Read more in the plugin's README.
  • #3411 - GCode viewer: Show retracts, moves and head position only for the current layer to reduce visual noise.
  • #3415 - Backup: Allow to specify path to backup to create on CLI: octoprint plugins backup:backup --path /path/to/my/backup.zip
  • #3420 - Add manifest.json and link from web UI to allow styling of homepage shortcuts on mobile devices as UI-less browser window.
  • #3433 - Allow sorting of file list by last print date.
  • #3471 - Reword buttons on print cancel confirmation to avoid misunderstandings.
  • #3479 - Configuration option to disable SD print detection, to work around misbehaving firmware variants (e.g. Ultimaker 2/2+, for which that setting will also now get applied automatically)
  • #3482 - Configuration options to configure SameSite and SecureCookie headers. Might be needed for certain environments where OctoPrint gets embedded into a third party page, together with switching to https.
  • #3496 - Add option to restore from a backup right at the start of the first run setup wizard.
  • #3497 - Performance improvements for static assets: introduce gzip encoding, whitespace removal, assetpreloading, request count reduction & also update some frontend dependencies.
  • #3506 - Allow to inject custom temperature from plugins into the data collection in the backend. Note that this will not have custom temperature magically appear in the UI, this is only the first step towards that.
  • #3526 - Set LC_ALL and LANG environment variables in bundled startup files.
  • #3534 - Add optional request profiler. Can be enabled by starting the server with --debug and adding the perfprofile query parameter to any request.
  • #3567 - Clean up workaround for #2166 that is no longer needed
  • #3569 - Properly reflect on the UI that feed rate and flow rate modifiers are write-only ephemeral values that cannot be read back from the firmware by removing permanent display.
  • #3590 - Add M82 and M83 to extrude/retract commands to make sure the extruder really is switcher to relative and back to absolute in case of firmware that decouples the extruder from G90 & G91.
  • #3596 - Add move button to files and folders on file list in the sidebar so that moving around files and folders becomes natively supported by the UI (see also #3609)
  • #3604 - Add print, select and userdata as provided via the API to the Upload event.
  • #3606 - Plugin Manager: Include stats & github metadata for plugins in the repository, just like now available on plugins.octoprint.org.
  • #3640: Disable JS minification for third party plugins again, it can cause issues in one plugin that are non recoverable and cause the JS of all third party plugins to no longer load. Added devel.webassets.minify_plugins config setting to allow to turn it back on by plugin authors to test their plugins for minification compatibility (which should be a goal).
  • #3661 - Protect against invalid input data extracted from Github in plugin repository browser
  • Tracking: Send full environment with each daily pong for better stats regarding used Python & operating system versions
  • Keep load & print button active if the file is already loaded because otherwise some people get confused when they "can't reprint the same file again"
  • Printer Safety Check: Renamed to Firmware Check & extracted into still bundled but separately maintained plugin. Now also detects firmware with known broken communcation protocol implementations (like the infamous CBD make it and ZWLF make it variants) and links to related FAQ entries on detection.
  • Moved source code repository from foosel/OctoPrint to OctoPrint/OctoPrint and updated links where needed accordingly.
  • Include python version in footer of UI
  • Plugin Manager: Add python compatibility information for installed plugins to overview in settings
  • Not only check general connectivity to the internet, but also whether DNS name resolution works (per default against octoprint.org). This is to combat repeatedly observed issues by users who managed to somehow get their system connected to the internet but without a valid nameserver configuration.
  • Allow disabling sanity checking of tool commands Tn sent to the printer, in case of misbehaving firmware that reports tools as invalid that aren't invalid.
  • New bundled plugin "Printer notifications" that implements support for //action:notification messages from the printer
  • Action Command Prompt: Renamed to "Printer dialogs" in the settings
  • Add link to default cancel GCode script to GCode script editor. People tend to delete it and then are unable to find it again in the docs.
  • Persist file list styly in local storage just like sorting & filter options.
  • Appkeys: Allow to manually generate keys for users via the global settings as well.
  • Strongly recommend bundled Appkeys plugin over global API key for improved security.
  • Plugin Manager: Dedicated error message on general failure instead of unhelpful and misleading "pip not available" message.
  • Port patterns and individual baudrates can now be put on a blacklist so they don't get offered by OctoPrint to connect to and/or used in auto detection.
  • New hook octoprint.comm.transport.serial.additional_port_names to allow plugins to inject additional (custom) port names into OctoPrint to use for connecting to. Especially of interest in combination with octoprint.comm.transport.serial.factory.
  • Virtual Printer: Isolate fully into its own plugin, incl. migrating the settings from devel.virtualPrinter to plugins.virtual_printer.
  • Virtual Printer: Support baudrate and port properties on faked serial.
  • Plugin Manager: Support installing single file plugins from URL or from upload.
  • Improve performance of octoprint.filemanager.util.LineProcessorStream
  • Increase size of file metadata LRU cache to 100 entries
  • Refactored buffered readline wrapper around serial port and added logging of read \0 bytes. See also discussion in #2454.
  • Action Command Prompt aka Printer Dialogs: Default to emergency sending & signalling being enabled, if detected as supporte from the firmware's capability report.
  • Plugin Manager: Small styling changes on plugin list and repository browser
  • Logging: Added an UI indicator when serial.log is active that acts as a reminder to disable it again after debugging.
  • Some layout optimizations in the About dialog.
  • Add link to Discord server to footer and About dialog.
  • GCode Viewer: Isolate fully into its own plugin, incl. migrating the settings from gcodeViewer to plugins.gcodeviewer.
  • Slight changes in the HTML markup to improve E2E testability.
  • Update Tornado, Jinja2, Flask and related dependencies to last versions supporting both Python 2 and 3. See also #3551
  • Various documentation fixes (see also #3516, #3517, #3575, #3608)
  • Various translation fixes (see also #3514)

Bug fixes

  • #3346 - Only compute ETag for HTML once per reload & optimize performance of config hashing
  • #3376 - Do not close and reopen connection on spammed connection requests but instead deny them.
  • #3378 - Drop file descriptors everywhere we can to avoid issues with processes inheriting them.
  • #3394 - Fix broken by design comm port auto detection through complete rewrite.
  • #3404 - Fix ordering of replacement tabs for core tabs declared by plugins.
  • #3416 - Backup: Preserve original file modification timestamp on backup restore
  • #3422 - Fix caching on /api/files
  • #3467 - Fix temperature reporting for shared nozzle setups where the firmware only ever reports T0
  • #3492 - Fix /api/version permission requirements
  • #3493 - Fix a NoneType comparison error (see also #3494)
  • #3502 - Possible fix for web interface not fully loading due to a not removed timeout trigger.
  • #3510 - Work around a bug in Tornado causing same origin checks to be run case sensitive which doesn't conform with RFC6454
  • #3525 - select command during an ongoing print should return 409 Conflict on the API
  • #3536 - Fix plugin data cleanup, it should not set deleted plugin settings to null but instead delete them from the config (see also #3566)
  • #3547 - Fix Read-only group behaviour so that it is actually possible to create read-only users. The User group is no longer enforced on users, though pre checked for new users (if kept default). This makes it also possible to create group less users, so keep that in mind.
  • #3553 - Virtual Printer: Fix issue where _simulateTemps may never reach target temp
  • #3554 - Fix persistence of default flag on group edit.
  • #3555 - Pin markupsafe Jinja2 dependency to >=1.1,<2.0. Newer versions are Python 3 only.
  • #3582 - Announcements: Fix navbar icon
  • #3627 (regression) - Fix auto detection scenario with port AUTO, set baudrate and one possible port
  • #3628 (regression) - Fix unclosed tags in German translation which messed up the settings
  • #3629 (regression?) - Fix logging error caused by tracking plugin during shutdown
  • #3630 (regression) - Fix single file plugin installs under Python 2.7
  • #3633 (regression) - Fix high CPU load while connected to a printer
  • #3642 (regression) - Fix styling on file list titles causing an issue with plugins like PrintTimeGenius that add on to the title, making the additional information toggle no longer work.
  • #3653 (regression) - Fixed disconnect during auto connect hanging indefinitely or not getting properly reported to frontend
  • #3655 (regression) - Fixed broken /api/files/local API
  • Fix progress reporting on files with CRLF EOLs
  • Only use supplied analysis data if it is actually complete, otherwise enrich with our own analysis
  • Fix session validation, remove side effects for login behaviour after server restart.
  • Software Update: Delete unnecessary check_providers from config for good.
  • Mark all bundled plugins as Python 3 compatible (cosmetic change only, they already were).
  • Plugin Manager: Fix styling of affected versions list in plugin notification popups.
  • Change instances of logger.warn to logger.warning
  • Change instances of warnings.warning to warnings.warn
  • Don't log warnings from plugin system initialization for CLI command invocations.
  • Fix some Py2vs3 bugs
  • Fix a bug that could cause custom translations to not properly load due to a missing path check.
  • Fix a possible race condition in the login dialog causing initial login to fail.
  • Fixed a duplicated ID in the generated HTML (regression)

Special thanks to all the contributors!

Special thanks to everyone who contributed to this release, especially to @drifkind, @eyal0, @FedericoNembrini, @fieldOfView, @flaviut, @jneilliii, @joshfriend, @justfalter, @kerber, @lachyc, @osubuu and @tedder for their PRs!

More information

Don't miss a new OctoPrint release

NewReleases is sending notifications on new releases.