Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97d37c5078 | ||
|
|
432090a56a | ||
|
|
1847b41f7e | ||
|
|
92c43ee6f9 | ||
|
|
cce37f0501 | ||
|
|
71b2cc87a3 | ||
|
|
2062acd372 | ||
|
|
fe13348fd3 | ||
|
|
903dd36d68 | ||
|
|
460481c9c2 | ||
|
|
2806676707 | ||
|
|
0a634a76a0 | ||
|
|
41c0dac19d | ||
|
|
f728423f29 | ||
|
|
61e5184377 | ||
|
|
a2527998c2 | ||
|
|
386ae7609d | ||
|
|
e15946ff79 |
No files matched your search
+3
-3
@@ -24,10 +24,10 @@ maintenance 1.3.9 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
|||||||
fix/.* 1.3.9 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
fix/.* 1.3.9 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||||
improve/.* 1.3.9 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
improve/.* 1.3.9 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||||
|
|
||||||
# staging/maintenance is currently the branch for preparation of 1.3.7rc5
|
# staging/maintenance is currently the branch for preparation of 1.3.9rc4
|
||||||
# so is regressionfix/...
|
# so is regressionfix/...
|
||||||
staging/maintenance 1.3.9rc2 fdf0f75ffa5731fee406c6e761e84a9d2b47aa43 pep440-dev
|
staging/maintenance 1.3.9rc4 2806676707020b270097876d6189d3c484dd47b8 pep440-dev
|
||||||
regressionfix/.* 1.3.9rc2 fdf0f75ffa5731fee406c6e761e84a9d2b47aa43 pep440-dev
|
regressionfix/.* 1.3.9rc4 2806676707020b270097876d6189d3c484dd47b8 pep440-dev
|
||||||
|
|
||||||
# every other branch is a development branch and thus gets resolved to 1.4.0-dev for now
|
# every other branch is a development branch and thus gets resolved to 1.4.0-dev for now
|
||||||
.* 1.4.0 7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc pep440-dev
|
.* 1.4.0 7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc pep440-dev
|
||||||
+33
-19
@@ -1,35 +1,32 @@
|
|||||||
# OctoPrint Changelog
|
# OctoPrint Changelog
|
||||||
|
|
||||||
## 1.3.9rc2 (2018-07-06)
|
## 1.3.9 (2018-07-25)
|
||||||
|
|
||||||
### Improvements
|
### Still running OctoPrint 1.3.6? Heads-up!
|
||||||
|
|
||||||
* Add sanity check for disabled plugin list (see also [#2687 (comment)](https://github.com/foosel/OctoPrint/issues/2687#issuecomment-399797596)).
|
OctoPrint 1.3.9 includes a couple of dependency updates whose update during switch to 1.3.9 are known to trigger an "update failed" message within OctoPrint's update dialog:
|
||||||
* Improve logging of exceptions triggered inside the state update worker (see also [#2715](https://github.com/foosel/OctoPrint/issues/2715)).
|
|
||||||
|
|
||||||
### Bug fixes
|

|
||||||
|
|
||||||
* [#2715](https://github.com/foosel/OctoPrint/issues/2715) (regression) - Fix broken estimator initialization on SD print start and resulting crash of the state update worker.
|
The update did in fact succeed and the issue lies with a change in the underlying update mechanism concerning the dependencies. This problem has been fixed in 1.3.7/1.3.8 and versions prior to 1.3.6 aren't yet affected, so there you won't ever see this message there. If you are still running 1.3.6 though and updating from it, **simply run the update a second time through Settings > Software Update > Check for updates and clicking "Update now" in the reshown update notification**.
|
||||||
|
|
||||||
### More information
|
### Running NGINX as reverse proxy? Be sure to configure HTTP protocol version 1.1!
|
||||||
|
|
||||||
* [Commits](https://github.com/foosel/OctoPrint/compare/1.3.9rc1...1.3.9rc2)
|
OctoPrint 1.3.9 updates the internal webserver Tornado from 4.0.2 to 4.5.3. Among many many fixes and improvements this also includes a change (actually a fix) in the websocket implementation that requires you to tell your NGINX to use HTTP 1.1 instead of the default 1.0 to talk to OctoPrint. You can do this by simply adding
|
||||||
|
|
||||||
## 1.3.9rc1 (2018-06-20)
|
|
||||||
|
|
||||||
### Note for upgraders running NGINX as reverse proxy: Be sure to configure HTTP protocol version 1.1
|
|
||||||
|
|
||||||
OctoPrint 1.3.8 updates the internal webserver Tornado from 4.0.2 to 4.5.3. Among many many fixes and improvements this also includes a change (actually a fix) in the websocket implementation that requires you to tell your NGINX to use HTTP 1.1 instead of the default 1.0 to talk to OctoPrint. You can do this by simply adding
|
|
||||||
|
|
||||||
```
|
```
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
```
|
```
|
||||||
|
|
||||||
to the `location` config. The [configuration examples](https://github.com/foosel/OctoPrint/wiki/Reverse-proxy-configuration-examples) have been adjusted accordingly. See also [#2526](https://github.com/foosel/OctoPrint/issues/2526).
|
to the `location` config. The [configuration examples](https://discourse.octoprint.org/t/reverse-proxy-configuration-examples/1107) have been adjusted accordingly. See also [#2526](https://github.com/foosel/OctoPrint/issues/2526).
|
||||||
|
|
||||||
### Note for plugin authors
|
### Disabled IPv6 and now there are issues with the server after the update? Bind to IPv4 addresses only!
|
||||||
|
|
||||||
As [announced with the release of OctoPrint 1.3.6](https://octoprint.org/blog/2017/12/12/new-release-1.3.6/), the legacy plugin bundling flag has now been removed again. [Make sure to check your plugins](https://octoprint.org/blog/2017/12/01/heads-up-plugin-authors/) if you haven't done that so far!
|
Starting with this release OctoPrint natively supports IPv6 and will attempt to bind to such addresses if it detects support in the underlying OS. If for whatever reason your OS doesn't support IPv6 even though Python's `socket` says otherwise, you can tell OctoPrint to bind to an IPv4 address only either via the `--host` command line parameter or `server.host` in `config.yaml`. Use `127.0.0.1` for localhost only, `0.0.0.0` for all IPv4 addresses or whatever specific IPv4 address you want to bind to.
|
||||||
|
|
||||||
|
### Plugin author and still dependent on the legacy plugin bundling flag? Fix your plugin!
|
||||||
|
|
||||||
|
As [announced with the release of OctoPrint 1.3.6](https://octoprint.org/blog/2017/12/12/new-release-1.3.6/), the legacy plugin bundling flag has now been removed again. [Make sure to check and if necessary fix your plugins](https://octoprint.org/blog/2017/12/01/heads-up-plugin-authors/) if you haven't done that so far!
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
@@ -83,6 +80,10 @@ As [announced with the release of OctoPrint 1.3.6](https://octoprint.org/blog/20
|
|||||||
* Added two new hooks for firmware information, [`octoprint.comm.firmware.info`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-comm-firmware-info) and [`octoprint.comm.firmware.capabilities`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-comm-firmware-capabilities).
|
* Added two new hooks for firmware information, [`octoprint.comm.firmware.info`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-comm-firmware-info) and [`octoprint.comm.firmware.capabilities`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-comm-firmware-capabilities).
|
||||||
* Added view model list to `OctoPrint.coreui` UI module.
|
* Added view model list to `OctoPrint.coreui` UI module.
|
||||||
* Improved logging of `FatalStartupError`s.
|
* Improved logging of `FatalStartupError`s.
|
||||||
|
* Add sanity check for disabled plugin list (see also [#2687 (comment)](https://github.com/foosel/OctoPrint/issues/2687#issuecomment-399797596)).
|
||||||
|
* Improve logging of exceptions triggered inside the state update worker (see also [#2715](https://github.com/foosel/OctoPrint/issues/2715)).
|
||||||
|
* Workaround for a potential `pip` issue when updating components through the Software Update plugin.
|
||||||
|
* Fix resend and timeout handling during an active `job_on_hold`.
|
||||||
* Updated some dependencies:
|
* Updated some dependencies:
|
||||||
* Tornado to 4.5. Version 5 sadly has issues with web socket handling when access behind `haproxy`. So far no solution has been found, so we stay at 4.5 for now.
|
* Tornado to 4.5. Version 5 sadly has issues with web socket handling when access behind `haproxy`. So far no solution has been found, so we stay at 4.5 for now.
|
||||||
* jQuery to 3.3.1
|
* jQuery to 3.3.1
|
||||||
@@ -127,21 +128,34 @@ As [announced with the release of OctoPrint 1.3.6](https://octoprint.org/blog/20
|
|||||||
* [#2625](https://github.com/foosel/OctoPrint/issues/2625) - Fixed incompatibility of OctoPrint's plugin subsystem with Python wheels, which are the default mode of installing plugins from pip version 10.0.0 onward.
|
* [#2625](https://github.com/foosel/OctoPrint/issues/2625) - Fixed incompatibility of OctoPrint's plugin subsystem with Python wheels, which are the default mode of installing plugins from pip version 10.0.0 onward.
|
||||||
* [#2632](https://github.com/foosel/OctoPrint/issues/2632) - Fixed race condition in resend handling on missing `ok`s.
|
* [#2632](https://github.com/foosel/OctoPrint/issues/2632) - Fixed race condition in resend handling on missing `ok`s.
|
||||||
* [#2675](https://github.com/foosel/OctoPrint/issues/2675) - Fixed a possible division by zero on SD upload.
|
* [#2675](https://github.com/foosel/OctoPrint/issues/2675) - Fixed a possible division by zero on SD upload.
|
||||||
|
* [#2677](https://github.com/foosel/OctoPrint/issues/2677) (regression) - Fix a deadlock when `job_on_hold` is utilized (causing issues at least with Octolapse)
|
||||||
* [#2683](https://github.com/foosel/OctoPrint/pull/2683) - Fixed two missing spaces in the german translation.
|
* [#2683](https://github.com/foosel/OctoPrint/pull/2683) - Fixed two missing spaces in the german translation.
|
||||||
|
* [#2715](https://github.com/foosel/OctoPrint/issues/2715) (regression) - Fix broken estimator initialization on SD print start and resulting crash of the state update worker.
|
||||||
|
* [#2719](https://github.com/foosel/OctoPrint/issues/2719) (regression) - Fix live print time estimation
|
||||||
|
* [#2737](https://github.com/foosel/OctoPrint/issues/2737) (regression) - Fix print button being enabled even though no file is selected.
|
||||||
|
* [#2738](https://github.com/foosel/OctoPrint/issues/2738) (regression) - Limit the use of the `--no-cache-dir` argument added to `pip` calls to such versions of `pip` that already support it (anything newer than 1.5.6).
|
||||||
* Properly handle absolute paths for recovery data comparison.
|
* Properly handle absolute paths for recovery data comparison.
|
||||||
* Fixed snapshot test button not resetting on error.
|
* Fixed snapshot test button not resetting on error.
|
||||||
* Fixed decoupling of metadata logs in the file manager.
|
* Fixed decoupling of metadata logs in the file manager.
|
||||||
* Fixed "remember me" and IPv4/IPv6 sessions. This might also solve [#1881](https://github.com/foosel/OctoPrint/issues/1881).
|
* Fixed "remember me" and IPv4/IPv6 sessions. This might also solve [#1881](https://github.com/foosel/OctoPrint/issues/1881).
|
||||||
* Removed Repetier resend repetition detection and handling code. It was buggy and introducing issues.
|
* Removed Repetier resend repetition detection and handling code. It was buggy and introducing issues.
|
||||||
* Fixed script order: `beforePrint*` should always precede any commands from the print job.
|
* Fixed script order: `beforePrint*` should always precede any commands from the print job.
|
||||||
|
* Only perform write tests on directories where necessary. Especially avoid them on page rendition to prevent misconfigured folders from triggering an HTTP 500. (regression)
|
||||||
|
|
||||||
### Special thanks to all the contributors!
|
### Special thanks to all the contributors!
|
||||||
|
|
||||||
Special thanks to everyone who contributed to this release candidate, especially [@benlye](https://github.com/benlye), [@dadosch](https://github.com/dadosch), [@dforsi](https://github.com/dforsi), [@ganey](https://github.com/ganey),[@malnvenshorn](https://github.com/malnvenshorn), [@ntoff](https://github.com/ntoff), [@tedder](https://github.com/tedder) and [@vitormhenrique](https://github.com/vitormhenrique) for their PRs.
|
Special thanks to everyone who contributed to this release, especially [@benlye](https://github.com/benlye), [@dadosch](https://github.com/dadosch), [@dforsi](https://github.com/dforsi), [@ganey](https://github.com/ganey),[@malnvenshorn](https://github.com/malnvenshorn), [@ntoff](https://github.com/ntoff), [@tedder](https://github.com/tedder) and [@vitormhenrique](https://github.com/vitormhenrique) for their PRs.
|
||||||
|
|
||||||
### More information
|
### More information
|
||||||
|
|
||||||
* [Commits](https://github.com/foosel/OctoPrint/compare/1.3.8...1.3.9rc1)
|
* [Commits](https://github.com/foosel/OctoPrint/compare/1.3.8...1.3.9)
|
||||||
|
* Release Candidates:
|
||||||
|
* [1.3.9rc1](https://github.com/foosel/OctoPrint/releases/tag/1.3.9rc1)
|
||||||
|
* [1.3.9rc2](https://github.com/foosel/OctoPrint/releases/tag/1.3.9rc2)
|
||||||
|
* [1.3.9rc3](https://github.com/foosel/OctoPrint/releases/tag/1.3.9rc3)
|
||||||
|
* [1.3.9rc4](https://github.com/foosel/OctoPrint/releases/tag/1.3.9rc4)
|
||||||
|
* A big **Thank you!** to everyone who reported back on these release candidates this time:
|
||||||
|
[arhi](https://github.com/arhi), [b-morgan](https://github.com/b-morgan), [brandstaetter](https://github.com/brandstaetter), [buchnoun](https://github.com/buchnoun), [CapnBry](https://github.com/CapnBry), [chatrat12](https://github.com/chatrat12), [ChrisHeerschap](https://github.com/ChrisHeerschap), [christianlupus](https://github.com/christianlupus), [chrisWhyTea](https://github.com/chrisWhyTea), [Crowlord](https://github.com/Crowlord), [ctgreybeard](https://github.com/ctgreybeard), [Cyberwizzard](https://github.com/Cyberwizzard), [DrJuJu](https://github.com/DrJuJu), [ejjenkins](https://github.com/ejjenkins), [fieldOfView](https://github.com/fieldOfView), [FormerLurker](https://github.com/FormerLurker), [four-of-four](https://github.com/four-of-four), [Galfinite](https://github.com/Galfinite), [gege2b](https://github.com/gege2b), [HFMan](https://github.com/HFMan), [jjlink](https://github.com/jjlink), [jneilliii](https://github.com/jneilliii), [JohnOCFII](https://github.com/JohnOCFII), [jwg3](https://github.com/jwg3), [kazibole](https://github.com/kazibole), [larp-welt](https://github.com/larp-welt), [McFly99](https://github.com/McFly99), [mod38](https://github.com/mod38), [ntoff](https://github.com/ntoff), [OutsourcedGuru](https://github.com/OutsourcedGuru), [paukstelis](https://github.com/paukstelis), [pingywon](https://github.com/pingywon), [pscrespo](https://github.com/pscrespo), [Rapsey](https://github.com/Rapsey), [tech-rat](https://github.com/tech-rat), [tedder](https://github.com/tedder), [thess](https://github.com/thess), [Thisismydigitalself](https://github.com/Thisismydigitalself), [tibmeister](https://github.com/tibmeister)
|
||||||
|
|
||||||
## 1.3.8 (2018-04-13)
|
## 1.3.8 (2018-04-13)
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -28,6 +28,7 @@ thanks to everyone who contributed!
|
|||||||
* Jeff Renfer
|
* Jeff Renfer
|
||||||
* Jefferson Hunt
|
* Jefferson Hunt
|
||||||
* Jeremiah Avery
|
* Jeremiah Avery
|
||||||
|
* Joseph Payne
|
||||||
* Josh Daniels
|
* Josh Daniels
|
||||||
* Joshua Wills
|
* Joshua Wills
|
||||||
* Justin Kaufman
|
* Justin Kaufman
|
||||||
@@ -59,4 +60,4 @@ thanks to everyone who contributed!
|
|||||||
* Timothy D Hoogland
|
* Timothy D Hoogland
|
||||||
* Trent Shumay
|
* Trent Shumay
|
||||||
|
|
||||||
and 1332 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
|
and 1351 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
|
||||||
@@ -57,18 +57,10 @@ path to that in the plugin settings.
|
|||||||
Compiling for Raspbian
|
Compiling for Raspbian
|
||||||
++++++++++++++++++++++
|
++++++++++++++++++++++
|
||||||
|
|
||||||
.. note::
|
Raspbian Jessie and later
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
A binary of CuraEngine 15.04.06 precompiled on Raspbian Jessie Lite 2016-03-18 is available
|
Building on Raspbian Jessie and later is as easy as::
|
||||||
`here <http://bit.ly/octopi_cura_engine_150406>`__. Don't forget to make it
|
|
||||||
executable after copying it to your preferred destination on your Pi
|
|
||||||
(suggestion: ``/usr/local/bin``) with ``chmod +x cura_engine``. Use at your
|
|
||||||
own risk.
|
|
||||||
|
|
||||||
Raspbian Jessie
|
|
||||||
~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Building on Raspbian Jessie is as easy as::
|
|
||||||
|
|
||||||
sudo apt-get -y install gcc-4.7 g++-4.7
|
sudo apt-get -y install gcc-4.7 g++-4.7
|
||||||
git clone -b legacy https://github.com/Ultimaker/CuraEngine.git
|
git clone -b legacy https://github.com/Ultimaker/CuraEngine.git
|
||||||
|
|||||||
@@ -100,12 +100,12 @@ class LoggingPlugin(octoprint.plugin.AssetPlugin,
|
|||||||
|
|
||||||
def _get_usage(self):
|
def _get_usage(self):
|
||||||
import psutil
|
import psutil
|
||||||
usage = psutil.disk_usage(settings().getBaseFolder("logs"))
|
usage = psutil.disk_usage(settings().getBaseFolder("logs", check_writable=False))
|
||||||
return usage.free, usage.total
|
return usage.free, usage.total
|
||||||
|
|
||||||
def _getLogFiles(self):
|
def _getLogFiles(self):
|
||||||
files = []
|
files = []
|
||||||
basedir = settings().getBaseFolder("logs")
|
basedir = settings().getBaseFolder("logs", check_writable=False)
|
||||||
for entry in scandir(basedir):
|
for entry in scandir(basedir):
|
||||||
files.append({
|
files.append({
|
||||||
"name": entry.name,
|
"name": entry.name,
|
||||||
|
|||||||
@@ -1037,11 +1037,11 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
|||||||
else:
|
else:
|
||||||
eventManager().fire(Events.FILE_DESELECTED)
|
eventManager().fire(Events.FILE_DESELECTED)
|
||||||
|
|
||||||
self._create_estimator()
|
|
||||||
|
|
||||||
self._setJobData(full_path, size, sd, user=user)
|
self._setJobData(full_path, size, sd, user=user)
|
||||||
self._stateMonitor.set_state(self._dict(text=self.get_state_string(), flags=self._getStateFlags()))
|
self._stateMonitor.set_state(self._dict(text=self.get_state_string(), flags=self._getStateFlags()))
|
||||||
|
|
||||||
|
self._create_estimator()
|
||||||
|
|
||||||
if self._printAfterSelect:
|
if self._printAfterSelect:
|
||||||
self._printAfterSelect = False
|
self._printAfterSelect = False
|
||||||
self.start_print(pos=self._posAfterSelect, user=user)
|
self.start_print(pos=self._posAfterSelect, user=user)
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ def readGcodeFiles():
|
|||||||
files = _getFileList(FileDestinations.LOCAL, filter=filter, recursive=recursive, allow_from_cache=not force)
|
files = _getFileList(FileDestinations.LOCAL, filter=filter, recursive=recursive, allow_from_cache=not force)
|
||||||
files.extend(_getFileList(FileDestinations.SDCARD))
|
files.extend(_getFileList(FileDestinations.SDCARD))
|
||||||
|
|
||||||
usage = psutil.disk_usage(settings().getBaseFolder("uploads"))
|
usage = psutil.disk_usage(settings().getBaseFolder("uploads", check_writable=False))
|
||||||
return jsonify(files=files, free=usage.free, total=usage.total)
|
return jsonify(files=files, free=usage.free, total=usage.total)
|
||||||
|
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ def readGcodeFilesForOrigin(origin):
|
|||||||
files = _getFileList(origin, filter=filter, recursive=recursive, allow_from_cache=not force)
|
files = _getFileList(origin, filter=filter, recursive=recursive, allow_from_cache=not force)
|
||||||
|
|
||||||
if origin == FileDestinations.LOCAL:
|
if origin == FileDestinations.LOCAL:
|
||||||
usage = psutil.disk_usage(settings().getBaseFolder("uploads"))
|
usage = psutil.disk_usage(settings().getBaseFolder("uploads", check_writable=False))
|
||||||
return jsonify(files=files, free=usage.free, total=usage.total)
|
return jsonify(files=files, free=usage.free, total=usage.total)
|
||||||
else:
|
else:
|
||||||
return jsonify(files=files)
|
return jsonify(files=files)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ from flask_babel import Locale
|
|||||||
@restricted_access
|
@restricted_access
|
||||||
@admin_permission.require(403)
|
@admin_permission.require(403)
|
||||||
def getInstalledLanguagePacks():
|
def getInstalledLanguagePacks():
|
||||||
translation_folder = settings().getBaseFolder("translations")
|
translation_folder = settings().getBaseFolder("translations", check_writable=False)
|
||||||
if not os.path.exists(translation_folder):
|
if not os.path.exists(translation_folder):
|
||||||
return jsonify(language_packs=dict(_core=[]))
|
return jsonify(language_packs=dict(_core=[]))
|
||||||
|
|
||||||
|
|||||||
@@ -958,7 +958,7 @@ def _get_all_translationfiles(locale, domain):
|
|||||||
|
|
||||||
po_files = []
|
po_files = []
|
||||||
|
|
||||||
user_base_path = os.path.join(settings().getBaseFolder("translations"))
|
user_base_path = os.path.join(settings().getBaseFolder("translations", check_writable=False))
|
||||||
user_plugin_path = os.path.join(user_base_path, "_plugins")
|
user_plugin_path = os.path.join(user_base_path, "_plugins")
|
||||||
|
|
||||||
# plugin translations
|
# plugin translations
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ class Settings(object):
|
|||||||
if folders is None:
|
if folders is None:
|
||||||
folders = default_settings["folder"].keys()
|
folders = default_settings["folder"].keys()
|
||||||
for folder in folders:
|
for folder in folders:
|
||||||
self.getBaseFolder(folder, log_error=True)
|
self.getBaseFolder(folder, check_writable=True, deep_check_writable=True, log_error=True)
|
||||||
|
|
||||||
def _get_default_folder(self, type):
|
def _get_default_folder(self, type):
|
||||||
folder = default_settings["folder"][type]
|
folder = default_settings["folder"][type]
|
||||||
@@ -1495,7 +1495,7 @@ class Settings(object):
|
|||||||
return value.lower() in valid_boolean_trues
|
return value.lower() in valid_boolean_trues
|
||||||
return value is not None
|
return value is not None
|
||||||
|
|
||||||
def getBaseFolder(self, type, create=True, allow_fallback=True, log_error=False):
|
def getBaseFolder(self, type, create=True, allow_fallback=True, log_error=False, check_writable=True, deep_check_writable=False):
|
||||||
if type not in default_settings["folder"].keys() + ["base"]:
|
if type not in default_settings["folder"].keys() + ["base"]:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -1508,7 +1508,7 @@ class Settings(object):
|
|||||||
folder = default_folder
|
folder = default_folder
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_validate_folder(folder, create=create, writable=True, log_error=log_error)
|
_validate_folder(folder, create=create, check_writable=check_writable, deep_check_writable=deep_check_writable, log_error=log_error)
|
||||||
except:
|
except:
|
||||||
if folder != default_folder and allow_fallback:
|
if folder != default_folder and allow_fallback:
|
||||||
if log_error:
|
if log_error:
|
||||||
@@ -1516,7 +1516,7 @@ class Settings(object):
|
|||||||
"fall back on default folder at {}".format(type,
|
"fall back on default folder at {}".format(type,
|
||||||
folder,
|
folder,
|
||||||
default_folder))
|
default_folder))
|
||||||
_validate_folder(default_folder, create=create, writable=True, log_error=log_error)
|
_validate_folder(default_folder, create=create, check_writable=check_writable, deep_check_writable=deep_check_writable, log_error=log_error)
|
||||||
folder = default_folder
|
folder = default_folder
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -1709,7 +1709,7 @@ class Settings(object):
|
|||||||
self._dirty_time = time.time()
|
self._dirty_time = time.time()
|
||||||
elif (path != currentPath and path != defaultPath) or force:
|
elif (path != currentPath and path != defaultPath) or force:
|
||||||
if validate:
|
if validate:
|
||||||
_validate_folder(path)
|
_validate_folder(path, check_writable=True, deep_check_writable=True)
|
||||||
|
|
||||||
if not "folder" in self._config.keys():
|
if not "folder" in self._config.keys():
|
||||||
self._config["folder"] = {}
|
self._config["folder"] = {}
|
||||||
@@ -1752,7 +1752,7 @@ def _default_basedir(applicationName):
|
|||||||
return os.path.expanduser(os.path.join("~", "." + applicationName.lower()))
|
return os.path.expanduser(os.path.join("~", "." + applicationName.lower()))
|
||||||
|
|
||||||
|
|
||||||
def _validate_folder(folder, create=True, writable=True, log_error=False):
|
def _validate_folder(folder, create=True, check_writable=True, deep_check_writable=False, log_error=False):
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
if not os.path.exists(folder):
|
if not os.path.exists(folder):
|
||||||
@@ -1777,12 +1777,13 @@ def _validate_folder(folder, create=True, writable=True, log_error=False):
|
|||||||
# hardening against misconfiguration, see #1953
|
# hardening against misconfiguration, see #1953
|
||||||
raise IOError("Expected a folder at {} but found a file instead".format(folder))
|
raise IOError("Expected a folder at {} but found a file instead".format(folder))
|
||||||
|
|
||||||
elif writable:
|
elif check_writable:
|
||||||
# make sure we can also write into the folder
|
# make sure we can also write into the folder
|
||||||
error = "Folder at {} doesn't appear to be writable, please fix its permissions".format(folder)
|
error = "Folder at {} doesn't appear to be writable, please fix its permissions".format(folder)
|
||||||
if not os.access(folder, os.W_OK):
|
if not os.access(folder, os.W_OK):
|
||||||
raise IOError(error)
|
raise IOError(error)
|
||||||
else:
|
|
||||||
|
elif deep_check_writable:
|
||||||
# try to write a file to the folder - on network shares that might be the only reliable way
|
# try to write a file to the folder - on network shares that might be the only reliable way
|
||||||
# to determine whether things are *actually* writable
|
# to determine whether things are *actually* writable
|
||||||
testfile = os.path.join(folder, ".testballoon.txt")
|
testfile = os.path.join(folder, ".testballoon.txt")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ $(function() {
|
|||||||
self.isSdReady = ko.observable(undefined);
|
self.isSdReady = ko.observable(undefined);
|
||||||
|
|
||||||
self.enablePrint = ko.pureComputed(function() {
|
self.enablePrint = ko.pureComputed(function() {
|
||||||
return self.isOperational() && self.isReady() && !self.isPrinting() && !self.isCancelling() && !self.isPausing() && self.loginState.isUser() && self.filename() !== undefined;
|
return self.isOperational() && self.isReady() && !self.isPrinting() && !self.isCancelling() && !self.isPausing() && self.loginState.isUser() && self.filename();
|
||||||
});
|
});
|
||||||
self.enablePause = ko.pureComputed(function() {
|
self.enablePause = ko.pureComputed(function() {
|
||||||
return self.isOperational() && (self.isPrinting() || self.isPaused()) && !self.isCancelling() && !self.isPausing() && self.loginState.isUser();
|
return self.isOperational() && (self.isPrinting() || self.isPaused()) && !self.isCancelling() && !self.isPausing() && self.loginState.isUser();
|
||||||
|
|||||||
@@ -75,16 +75,16 @@ def _extract_prefix(filename):
|
|||||||
|
|
||||||
|
|
||||||
def last_modified_finished():
|
def last_modified_finished():
|
||||||
return os.stat(settings().getBaseFolder("timelapse")).st_mtime
|
return os.stat(settings().getBaseFolder("timelapse", check_writable=False)).st_mtime
|
||||||
|
|
||||||
|
|
||||||
def last_modified_unrendered():
|
def last_modified_unrendered():
|
||||||
return os.stat(settings().getBaseFolder("timelapse_tmp")).st_mtime
|
return os.stat(settings().getBaseFolder("timelapse_tmp", check_writable=False)).st_mtime
|
||||||
|
|
||||||
|
|
||||||
def get_finished_timelapses():
|
def get_finished_timelapses():
|
||||||
files = []
|
files = []
|
||||||
basedir = settings().getBaseFolder("timelapse")
|
basedir = settings().getBaseFolder("timelapse", check_writable=False)
|
||||||
for entry in scandir(basedir):
|
for entry in scandir(basedir):
|
||||||
if not fnmatch.fnmatch(entry.name, "*.m*"):
|
if not fnmatch.fnmatch(entry.name, "*.m*"):
|
||||||
continue
|
continue
|
||||||
@@ -103,7 +103,7 @@ def get_unrendered_timelapses():
|
|||||||
|
|
||||||
delete_old_unrendered_timelapses()
|
delete_old_unrendered_timelapses()
|
||||||
|
|
||||||
basedir = settings().getBaseFolder("timelapse_tmp")
|
basedir = settings().getBaseFolder("timelapse_tmp", check_writable=False)
|
||||||
jobs = collections.defaultdict(lambda: dict(count=0, size=None, bytes=0, date=None, timestamp=None))
|
jobs = collections.defaultdict(lambda: dict(count=0, size=None, bytes=0, date=None, timestamp=None))
|
||||||
|
|
||||||
for entry in scandir(basedir):
|
for entry in scandir(basedir):
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
+33
-22
@@ -780,6 +780,9 @@ class MachineCom(object):
|
|||||||
return self._job_on_hold.counter > 0
|
return self._job_on_hold.counter > 0
|
||||||
|
|
||||||
def set_job_on_hold(self, value, blocking=True):
|
def set_job_on_hold(self, value, blocking=True):
|
||||||
|
trigger = False
|
||||||
|
|
||||||
|
# don't run any locking code beyond this...
|
||||||
if not self._job_on_hold.acquire(blocking=blocking):
|
if not self._job_on_hold.acquire(blocking=blocking):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -789,10 +792,14 @@ class MachineCom(object):
|
|||||||
else:
|
else:
|
||||||
self._job_on_hold.clear()
|
self._job_on_hold.clear()
|
||||||
if self._job_on_hold.counter == 0:
|
if self._job_on_hold.counter == 0:
|
||||||
self._continue_sending()
|
trigger = True
|
||||||
finally:
|
finally:
|
||||||
self._job_on_hold.release()
|
self._job_on_hold.release()
|
||||||
|
|
||||||
|
# locking code is now safe to run again
|
||||||
|
if trigger:
|
||||||
|
self._continue_sending()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def close(self, is_error=False, wait=True, timeout=10.0, *args, **kwargs):
|
def close(self, is_error=False, wait=True, timeout=10.0, *args, **kwargs):
|
||||||
@@ -1505,11 +1512,13 @@ class MachineCom(object):
|
|||||||
self.sayHello()
|
self.sayHello()
|
||||||
|
|
||||||
while self._monitoring_active:
|
while self._monitoring_active:
|
||||||
now = time.time()
|
|
||||||
try:
|
try:
|
||||||
line = self._readline()
|
line = self._readline()
|
||||||
if line is None:
|
if line is None:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
now = time.time()
|
||||||
|
|
||||||
if line.strip() is not "":
|
if line.strip() is not "":
|
||||||
self._consecutive_timeouts = 0
|
self._consecutive_timeouts = 0
|
||||||
self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals)
|
self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals)
|
||||||
@@ -1624,7 +1633,7 @@ class MachineCom(object):
|
|||||||
handled = False
|
handled = False
|
||||||
|
|
||||||
# process oks
|
# process oks
|
||||||
if line.startswith("ok") or (self.isPrinting() and not self.job_on_hold and supportWait and line == "wait"):
|
if line.startswith("ok") or (self.isPrinting() and supportWait and line == "wait"):
|
||||||
# ok only considered handled if it's alone on the line, might be
|
# ok only considered handled if it's alone on the line, might be
|
||||||
# a response to an M105 or an M114
|
# a response to an M105 or an M114
|
||||||
self._handle_ok()
|
self._handle_ok()
|
||||||
@@ -1638,11 +1647,11 @@ class MachineCom(object):
|
|||||||
handled = True
|
handled = True
|
||||||
|
|
||||||
# process timeouts
|
# process timeouts
|
||||||
elif ((line == "" and now > self._timeout) or (self.isPrinting()
|
elif ((line == "" and now >= self._timeout) or (self.isPrinting()
|
||||||
and not self.isSdPrinting()
|
and not self.isSdPrinting()
|
||||||
and not self.job_on_hold
|
and (not self.job_on_hold or self._resendActive)
|
||||||
and not self._long_running_command
|
and not self._long_running_command
|
||||||
and not self._heating and now > self._ok_timeout)) \
|
and not self._heating and now >= self._ok_timeout)) \
|
||||||
and (not self._blockWhileDwelling or not self._dwelling_until or now > self._dwelling_until):
|
and (not self._blockWhileDwelling or not self._dwelling_until or now > self._dwelling_until):
|
||||||
# We have two timeout variants:
|
# We have two timeout variants:
|
||||||
#
|
#
|
||||||
@@ -2069,21 +2078,16 @@ class MachineCom(object):
|
|||||||
if not self._state in self.OPERATIONAL_STATES:
|
if not self._state in self.OPERATIONAL_STATES:
|
||||||
return
|
return
|
||||||
|
|
||||||
# process queues ongoing resend requests and queues if we are operational
|
if self._resendDelta is not None and self._resendNextCommand():
|
||||||
|
# we processed a resend request and are done here
|
||||||
|
return
|
||||||
|
|
||||||
with self._sendingLock: # prevent concurrency due to resend_ok_timers
|
# continue with our queues and the job
|
||||||
if self._resendDelta is not None:
|
self._resendActive = False
|
||||||
self._resendNextCommand()
|
self._continue_sending()
|
||||||
else:
|
|
||||||
self._resendActive = False
|
|
||||||
self._continue_sending()
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def _handle_timeout(self):
|
def _handle_timeout(self):
|
||||||
if self._state not in (self.STATE_PRINTING,
|
if self._state not in self.OPERATIONAL_STATES:
|
||||||
self.STATE_PAUSED,
|
|
||||||
self.STATE_OPERATIONAL):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
general_message = "Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves."
|
general_message = "Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves."
|
||||||
@@ -2091,7 +2095,7 @@ class MachineCom(object):
|
|||||||
# figure out which consecutive timeout maximum we have to use
|
# figure out which consecutive timeout maximum we have to use
|
||||||
if self._long_running_command:
|
if self._long_running_command:
|
||||||
consecutive_max = self._consecutive_timeout_maximums.get("long", 0)
|
consecutive_max = self._consecutive_timeout_maximums.get("long", 0)
|
||||||
elif self._state in (self.STATE_PRINTING,):
|
elif self._state in self.PRINTING_STATES:
|
||||||
consecutive_max = self._consecutive_timeout_maximums.get("printing", 0)
|
consecutive_max = self._consecutive_timeout_maximums.get("printing", 0)
|
||||||
else:
|
else:
|
||||||
consecutive_max = self._consecutive_timeout_maximums.get("idle", 0)
|
consecutive_max = self._consecutive_timeout_maximums.get("idle", 0)
|
||||||
@@ -2127,7 +2131,7 @@ class MachineCom(object):
|
|||||||
# long running command active, ignore timeout
|
# long running command active, ignore timeout
|
||||||
self._logger.debug("Ran into a communication timeout, but a command known to be a long runner is currently active")
|
self._logger.debug("Ran into a communication timeout, but a command known to be a long runner is currently active")
|
||||||
|
|
||||||
elif self._state in (self.STATE_PRINTING, self.STATE_PAUSED):
|
elif self._state in self.PRINTING_STATES + (self.STATE_PAUSED,):
|
||||||
# printing, try to tickle the printer
|
# printing, try to tickle the printer
|
||||||
message = "Communication timeout while printing, trying to trigger response from printer."
|
message = "Communication timeout while printing, trying to trigger response from printer."
|
||||||
self._logger.info(message)
|
self._logger.info(message)
|
||||||
@@ -2773,6 +2777,11 @@ class MachineCom(object):
|
|||||||
self._resendDelta = 0
|
self._resendDelta = 0
|
||||||
self._resendDelta += 1
|
self._resendDelta += 1
|
||||||
|
|
||||||
|
elif self._resendDelta is None:
|
||||||
|
# we might enter this twice in quick succession if we get triggered by the
|
||||||
|
# resend_ok_timer, so make sure that resendDelta is actually still set (see #2632)
|
||||||
|
return False
|
||||||
|
|
||||||
cmd = self._lastLines[-self._resendDelta]
|
cmd = self._lastLines[-self._resendDelta]
|
||||||
lineNumber = self._currentLine - self._resendDelta
|
lineNumber = self._currentLine - self._resendDelta
|
||||||
|
|
||||||
@@ -2780,6 +2789,8 @@ class MachineCom(object):
|
|||||||
|
|
||||||
self._resendDelta -= 1
|
self._resendDelta -= 1
|
||||||
if self._resendDelta <= 0:
|
if self._resendDelta <= 0:
|
||||||
|
# reset everything BUT the resendActive flag - that will have to stay active until we receive
|
||||||
|
# our next ok!
|
||||||
self._resendDelta = None
|
self._resendDelta = None
|
||||||
self._lastResendNumber = None
|
self._lastResendNumber = None
|
||||||
self._currentResendCount = 0
|
self._currentResendCount = 0
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class UnknownPip(Exception):
|
|||||||
|
|
||||||
class PipCaller(CommandlineCaller):
|
class PipCaller(CommandlineCaller):
|
||||||
process_dependency_links = pkg_resources.Requirement.parse("pip>=1.5")
|
process_dependency_links = pkg_resources.Requirement.parse("pip>=1.5")
|
||||||
|
no_cache_dir = pkg_resources.Requirement.parse("pip>=1.6")
|
||||||
no_use_wheel = pkg_resources.Requirement.parse("pip==1.5.0")
|
no_use_wheel = pkg_resources.Requirement.parse("pip==1.5.0")
|
||||||
broken = pkg_resources.Requirement.parse("pip>=6.0.1,<=6.0.3")
|
broken = pkg_resources.Requirement.parse("pip>=6.0.1,<=6.0.3")
|
||||||
|
|
||||||
@@ -41,6 +42,11 @@ class PipCaller(CommandlineCaller):
|
|||||||
pip_version))
|
pip_version))
|
||||||
args.remove("--process-dependency-links")
|
args.remove("--process-dependency-links")
|
||||||
|
|
||||||
|
# strip --no-cache-dir for versions that don't support it
|
||||||
|
if not pip_version in cls.no_cache_dir and "--no-cache-dir" in args:
|
||||||
|
logger.debug("Found --no-cache-dir flag, version {} doesn't support that yet though, removing.".format(pip_version))
|
||||||
|
args.remove("--no-cache-dir")
|
||||||
|
|
||||||
# add --no-use-wheel for versions that otherwise break
|
# add --no-use-wheel for versions that otherwise break
|
||||||
if pip_version in cls.no_use_wheel and not "--no-use-wheel" in args:
|
if pip_version in cls.no_use_wheel and not "--no-use-wheel" in args:
|
||||||
logger.debug("Version {} needs --no-use-wheel to properly work.".format(pip_version))
|
logger.debug("Version {} needs --no-use-wheel to properly work.".format(pip_version))
|
||||||
|
|||||||
Binary file not shown.
+1746
-548
File diff suppressed because it is too large.
Load diff
@@ -6,9 +6,9 @@
|
|||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: OctoPrint 1.3.9.dev228+ge2f626d42\n"
|
"Project-Id-Version: OctoPrint 1.3.9rc4.post0.dev0+g71b2cc87a\n"
|
||||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||||
"POT-Creation-Date: 2018-06-19 15:20+0200\n"
|
"POT-Creation-Date: 2018-07-25 13:37+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
Reference in new issue
Block a user