Octoprint: Flask-0.10.1 error

Created on 31 Aug 2016  Â·  10Comments  Â·  Source: OctoPrint/OctoPrint

Traceback:

2010-01-01 03:01:29,989 - octoprint - ERROR - Exception on /intermediary.gif [GET]
Traceback (most recent call last):
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1479, in full_dispatch_request
    response = self.process_response(response)
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1693, in process_response
    self.save_session(ctx.session, response)
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 837, in save_session
    return self.session_interface.save_session(self, session, response)
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/sessions.py", line 326, in save_session
    val = self.get_signing_serializer(app).dumps(dict(session))
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/itsdangerous-0.24-py2.7.egg/itsdangerous.py", line 566, in dumps
    rv = self.make_signer(salt).sign(payload)
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/itsdangerous-0.24-py2.7.egg/itsdangerous.py", line 409, in sign
    timestamp = base64_encode(int_to_bytes(self.get_timestamp()))
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/itsdangerous-0.24-py2.7.egg/itsdangerous.py", line 220, in int_to_bytes
    assert num >= 0
AssertionError

OctoPrint 1.2.15 (master branch)

https://github.com/foosel/OctoPrint/issues/149 not help for me:

Traceback (most recent call last):
  File "/home/cubie/OctoPrint/venv/bin/octoprint", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2711, in <module>
    parse_requirements(__requires__), Environment()
  File "/home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Flask-Login>=0.2.2,<0.3
incomplete

Most helpful comment

I ran into this and discovered it's because of a very old system time set on the operating system. If you update your system time, you can fix this:

date --set "your current time"

All 10 comments

Hi @orangeudav,

It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).

If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines.

Please do not abuse the bug tracker as a support forum - if you have a question or otherwise need some kind of help or support refer to the Mailinglist or the G+ Community instead of here.

Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2016-09-14 13:50) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

Since apparently some of the required information is still missing, I'm closing this now, sorry. Feel free to request a reopen of this or create a new issue once you can provide all required information.

This is nothing personal. Thank you for your collaboration.

I ran into this and discovered it's because of a very old system time set on the operating system. If you update your system time, you can fix this:

date --set "your current time"

dmiddlecamp, I love you and want to have your babies. You just saved me ungodly amount of time.

I'm having the same issue on some devices that have run out of RTC backup battery and I can't allow console access to users to manually set the system time. How can I get around this issue? e.g. get the time from the client to set the system time or just allow an old system time?

One option is to add a script to run on start up to set some reasonably recent system time even if it’s inaccurate

Sent from my iPhone

On Feb 10, 2018, at 3:33 PM, PrecisionWaveRF notifications@github.com wrote:

I'm having the same issue on some devices that have run out of RTC backup battery and I can't allow console access to users to manually set the system time. How can I get around this issue? e.g. get the time from the client to set the system time or just allow an old system time?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

will this work in 10years from now too?

Does your setup require not fixing your clock for the next decade? ;)

Sent from my iPhone

On Feb 10, 2018, at 4:19 PM, PrecisionWaveRF notifications@github.com wrote:

will this work in 10years from now too?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

actually yes :) it's independent devices that are not supposed to be accessed via shell by customers. Units are not necessarily web connected, so NTP wont work. There's no way for me to know whether the time on the device is correct other than getting the client time and comparing that to the device time. But since flask won't render due to above AssertionError I can not do that. Any idea?

So, real time clocks powered by watch batteries lasting 10 years are not unusual, so I would strongly push back on the lack of that being a requirement. I think from a objective standpoint, your other choices would be to try and keep the time at least a little up to date via a variety of means, OR maybe you could patch flask to not sign the session with a timestamp?

Was this page helpful?
0 / 5 - 0 ratings